mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 22:44:05 +08:00
feat: data-driven.
This commit is contained in:
@@ -13,7 +13,8 @@
|
|||||||
"iteration": 1
|
"iteration": 1
|
||||||
},
|
},
|
||||||
"variables": {
|
"variables": {
|
||||||
"app_version": "f1"
|
"app_version": "f1",
|
||||||
|
"user_agent": "iOS/10.3"
|
||||||
},
|
},
|
||||||
"base_url": "https://postman-echo.com",
|
"base_url": "https://postman-echo.com",
|
||||||
"verify": false
|
"verify": false
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
"variables": {
|
"variables": {
|
||||||
"foo1": "$username",
|
"foo1": "$username",
|
||||||
"foo2": "$password",
|
"foo2": "$password",
|
||||||
"foo3": "$app_version"
|
"foo3": "$user_agent"
|
||||||
},
|
},
|
||||||
"request": {
|
"request": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
"check": "body.args.foo3",
|
"check": "body.args.foo3",
|
||||||
"assert": "not_equal",
|
"assert": "not_equal",
|
||||||
"expect": "f1",
|
"expect": "iOS/10.3",
|
||||||
"msg": "check app version"
|
"msg": "check app version"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ config:
|
|||||||
iteration: 1
|
iteration: 1
|
||||||
variables:
|
variables:
|
||||||
app_version: f1
|
app_version: f1
|
||||||
|
user_agent: iOS/10.3
|
||||||
base_url: "https://postman-echo.com"
|
base_url: "https://postman-echo.com"
|
||||||
verify: False
|
verify: False
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ teststeps:
|
|||||||
variables:
|
variables:
|
||||||
foo1: $username
|
foo1: $username
|
||||||
foo2: $password
|
foo2: $password
|
||||||
foo3: $app_version
|
foo3: $user_agent
|
||||||
request:
|
request:
|
||||||
method: GET
|
method: GET
|
||||||
url: /get
|
url: /get
|
||||||
@@ -34,5 +35,5 @@ teststeps:
|
|||||||
msg: check status code
|
msg: check status code
|
||||||
- check: body.args.foo3
|
- check: body.args.foo3
|
||||||
assert: not_equal
|
assert: not_equal
|
||||||
expect: f1
|
expect: iOS/10.3
|
||||||
msg: check app version
|
msg: check app version
|
||||||
Reference in New Issue
Block a user