mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-02 21:11:38 +08:00
make variables in testcase template compatible with mapping style:
new mapping style:
"variables": {
"a": 1,
"b": 2
}
Also, the former list style is still valid:
"variables": [
{"a": 1},
{"b": 2}
]
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
- config:
|
||||
name: "create user testcases."
|
||||
variables:
|
||||
- user_agent: 'iOS/10.3'
|
||||
- device_sn: ${gen_random_string(15)}
|
||||
- os_platform: 'ios'
|
||||
- app_version: '2.8.6'
|
||||
user_agent: 'iOS/10.3'
|
||||
device_sn: ${gen_random_string(15)}
|
||||
os_platform: 'ios'
|
||||
app_version: '2.8.6'
|
||||
base_url: ${get_base_url()}
|
||||
|
||||
- test:
|
||||
@@ -28,8 +28,8 @@
|
||||
- test:
|
||||
name: create user which does not exist
|
||||
variables:
|
||||
- user_name: "user1"
|
||||
- user_password: "123456"
|
||||
user_name: "user1"
|
||||
user_password: "123456"
|
||||
request:
|
||||
url: /api/users/1000
|
||||
method: POST
|
||||
|
||||
Reference in New Issue
Block a user