mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
33 lines
745 B
YAML
33 lines
745 B
YAML
- config:
|
|
name: "setup and reset all."
|
|
id: setup_and_reset
|
|
variables:
|
|
user_agent: 'iOS/10.3'
|
|
device_sn: "TESTCASE_SETUP_XXX"
|
|
os_platform: 'ios'
|
|
app_version: '2.8.6'
|
|
base_url: "http://127.0.0.1:5000"
|
|
verify: False
|
|
export:
|
|
- session_token
|
|
|
|
- test:
|
|
name: get token (setup)
|
|
api: api/get_token.yml
|
|
variables:
|
|
user_agent: 'iOS/10.3'
|
|
device_sn: $device_sn
|
|
os_platform: 'ios'
|
|
app_version: '2.8.6'
|
|
extract:
|
|
- session_token: content.token
|
|
validate:
|
|
- eq: ["status_code", 200]
|
|
- len_eq: ["content.token", 16]
|
|
|
|
- test:
|
|
name: reset all users
|
|
api: api/reset_all.yml
|
|
variables:
|
|
token: $session_token
|