mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
31 lines
950 B
YAML
31 lines
950 B
YAML
- test:
|
|
name: get token
|
|
request:
|
|
url: http://127.0.0.1:5000/api/get-token
|
|
method: POST
|
|
headers:
|
|
user_agent: iOS/10.3
|
|
device_sn: 9TN6O2Bn1vzfybF
|
|
os_platform: ios
|
|
app_version: 2.8.6
|
|
json:
|
|
sign: 19067cf712265eb5426db8d3664026c1ccea02b9
|
|
validate:
|
|
- {"check": "status_code", "comparator": "eq", "expect": 200}
|
|
- {"check": "content.token", "comparator": "len_eq", "expect": 16}
|
|
|
|
- test:
|
|
name: create user which does not exist
|
|
request:
|
|
url: http://127.0.0.1:5000/api/users/1000
|
|
method: POST
|
|
headers:
|
|
device_sn: 9TN6O2Bn1vzfybF
|
|
token: F8prvGryC5beBr4g
|
|
json:
|
|
name: "user1"
|
|
password: "123456"
|
|
validate:
|
|
- {"check": "status_code", "comparator": "eq", "expect": 201}
|
|
- {"check": "content.success", "comparator": "eq", "expect": true}
|