Files
httprunner/tests/data/bugfix_parameters.yml
debugtalk 2ec2d3c2d8 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}
]
2018-11-28 12:14:06 +08:00

28 lines
695 B
YAML

# fix #258
- config:
name: "user management testcase."
variables:
user_agent: 'iOS/10.3'
device_sn: ${gen_random_string(15)}
os_platform: 'ios'
app_version: '2.8.6'
parameters:
- user_agent: ['iOS', 'android']
request:
base_url: ${get_base_url()}
headers:
Content-Type: application/json
device_sn: $device_sn
output:
- token
- test:
name: get token with $user_agent, $app_version
api: get_token
extract:
- token: content.token
validate:
- "eq": ["status_code", 200]
- "len_eq": ["content.token", 16]
- "contains": [{"a": 1, "b": 2}, "b"]