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:
debugtalk
2018-11-28 12:11:50 +08:00
parent fd69d1faf0
commit 2ec2d3c2d8
20 changed files with 141 additions and 142 deletions

View File

@@ -2,10 +2,10 @@
name: "setup and reset all."
id: setup_and_reset
variables:
- user_agent: 'iOS/10.3'
- device_sn: "TESTCASE_SETUP_XXX"
- os_platform: 'ios'
- app_version: '2.8.6'
user_agent: 'iOS/10.3'
device_sn: "TESTCASE_SETUP_XXX"
os_platform: 'ios'
app_version: '2.8.6'
base_url: "http://127.0.0.1:5000"
verify: False
output:
@@ -15,10 +15,10 @@
name: get token (setup)
api: get_token
variables:
- user_agent: 'iOS/10.3'
- device_sn: $device_sn
- os_platform: 'ios'
- app_version: '2.8.6'
user_agent: 'iOS/10.3'
device_sn: $device_sn
os_platform: 'ios'
app_version: '2.8.6'
extract:
- token: content.token
validate:
@@ -29,4 +29,4 @@
name: reset all users
api: reset_all
variables:
- token: $token
token: $token