Files
httprunner/tests/data/demo_parameters.yml
httprunner 96fc410234 refactor parameterization:
parameter value now can be in three types:
(1) data list
(2) call built-in parameterize function
(3) call custom function in debugtalk.py
2018-03-07 16:21:51 +08:00

27 lines
793 B
YAML

- config:
name: "user management testset."
parameters:
- user_agent: ["iOS/10.1", "iOS/10.2", "iOS/10.3"]
- app_version: ${gen_app_version()}
- username: ${parameterize(account.csv)}
variables:
- user_agent: 'iOS/10.3'
- device_sn: ${gen_random_string(15)}
- os_platform: 'ios'
request:
base_url: $BASE_URL
headers:
Content-Type: application/json
device_sn: $device_sn
output:
- token
- test:
name: get token with $user_agent and $app_version, username $username
api: get_token($user_agent, $device_sn, $os_platform, $app_version)
extract:
- token: content.token
validate:
- "eq": ["status_code", 200]
- "len_eq": ["content.token", 16]