mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
28 lines
756 B
YAML
28 lines
756 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($user_agent, $device_sn, $os_platform, $app_version)
|
|
extract:
|
|
- token: content.token
|
|
validate:
|
|
- "eq": ["status_code", 200]
|
|
- "len_eq": ["content.token", 16]
|
|
- "contains": [{"a": 1, "b": 2}, "b"]
|