Files
httprunner/tests/data/demo_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

26 lines
658 B
YAML

- config:
name: "user management testcase."
parameters:
user_agent: ["iOS/10.1", "iOS/10.2", "iOS/10.3"]
username-password:
- ["test1","111111"]
- ["test2","222222"]
variables:
username: test1
user_agent: "iOS/10.1"
device_sn: ${gen_random_string(15)}
os_platform: 'ios'
app_version: 2.8.5
base_url: ${get_base_url()}
output:
- token
- test:
name: get token with $user_agent and $username
api: get_token
extract:
- token: content.token
validate:
- "eq": ["status_code", 200]
- "len_eq": ["content.token", 16]