mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 21:09:36 +08:00
parameter value now can be in three types: (1) data list (2) call built-in parameterize function (3) call custom function in debugtalk.py
27 lines
793 B
YAML
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]
|