fix #1308: load .env file as environment variables

This commit is contained in:
debugtalk
2022-05-23 21:16:23 +08:00
parent 7c85630c3d
commit f317fa05c0
14 changed files with 77 additions and 13 deletions

View File

@@ -0,0 +1,6 @@
{
"project_name": "demo-with-go-plugin",
"project_path": "/Users/debugtalk/MyProjects/HttpRunner-dev/httprunner/examples/demo-with-go-plugin",
"create_time": "2022-05-24T11:10:10.127839+08:00",
"hrp_version": "v4.1.0-beta"
}

View File

@@ -17,7 +17,7 @@
{
"name": "get with params",
"variables": {
"foo1": "bar11",
"foo1": "${ENV(USERNAME)}",
"foo2": "bar21",
"sum_v": "${sum_two_int(1, 2)}"
},
@@ -46,7 +46,7 @@
{
"eq": [
"body.args.foo1",
"bar11"
"debugtalk"
]
},
{

View File

@@ -13,7 +13,7 @@ teststeps:
-
name: get with params
variables:
foo1: bar11
foo1: ${ENV(USERNAME)}
foo2: bar21
sum_v: "${sum_two_int(1, 2)}"
request:
@@ -29,7 +29,7 @@ teststeps:
foo3: "body.args.foo2"
validate:
- eq: ["status_code", 200]
- eq: ["body.args.foo1", "bar11"]
- eq: ["body.args.foo1", "debugtalk"]
- eq: ["body.args.sum_v", "3"]
- eq: ["body.args.foo2", "bar21"]
-

View File

@@ -0,0 +1,6 @@
{
"project_name": "demo-with-py-plugin",
"project_path": "/Users/debugtalk/MyProjects/HttpRunner-dev/httprunner/examples/demo-with-py-plugin",
"create_time": "2022-05-24T11:10:15.544763+08:00",
"hrp_version": "v4.1.0-beta"
}

View File

@@ -17,7 +17,7 @@
{
"name": "get with params",
"variables": {
"foo1": "bar11",
"foo1": "${ENV(USERNAME)}",
"foo2": "bar21",
"sum_v": "${sum_two_int(1, 2)}"
},
@@ -46,7 +46,7 @@
{
"eq": [
"body.args.foo1",
"bar11"
"debugtalk"
]
},
{

View File

@@ -13,7 +13,7 @@ teststeps:
-
name: get with params
variables:
foo1: bar11
foo1: ${ENV(USERNAME)}
foo2: bar21
sum_v: "${sum_two_int(1, 2)}"
request:
@@ -29,7 +29,7 @@ teststeps:
foo3: "body.args.foo2"
validate:
- eq: ["status_code", 200]
- eq: ["body.args.foo1", "bar11"]
- eq: ["body.args.foo1", "debugtalk"]
- eq: ["body.args.sum_v", "3"]
- eq: ["body.args.foo2", "bar21"]
-

View File

@@ -0,0 +1,6 @@
{
"project_name": "demo-without-plugin",
"project_path": "/Users/debugtalk/MyProjects/HttpRunner-dev/httprunner/examples/demo-without-plugin",
"create_time": "2022-05-24T11:10:16.993462+08:00",
"hrp_version": "v4.1.0-beta"
}