mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
28 lines
768 B
YAML
28 lines
768 B
YAML
- config:
|
|
name: "user management testset."
|
|
parameters:
|
|
- user_agent: ["iOS/10.1", "iOS/10.2", "iOS/10.3"]
|
|
- username-password:
|
|
- ["test1","111111"]
|
|
- ["test2","222222"]
|
|
variables:
|
|
- device_sn: ${gen_random_string(15)}
|
|
- os_platform: 'ios'
|
|
- app_version: 2.8.5
|
|
request:
|
|
base_url: $BASE_URL
|
|
headers:
|
|
Content-Type: application/json
|
|
device_sn: $device_sn
|
|
output:
|
|
- token
|
|
|
|
- test:
|
|
name: get token with $user_agent and $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]
|