mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
23 lines
567 B
YAML
23 lines
567 B
YAML
name: get token
|
|
variables:
|
|
user_agent: XXX
|
|
device_sn: API_XXX
|
|
os_platform: XXX
|
|
app_version: XXX
|
|
request:
|
|
url: /api/get-token
|
|
method: POST
|
|
headers:
|
|
user_agent: $user_agent
|
|
device_sn: $device_sn
|
|
os_platform: $os_platform
|
|
app_version: $app_version
|
|
Content-Type: "application/json"
|
|
device_sn: $device_sn
|
|
json:
|
|
sign: ${get_sign($device_sn, $os_platform, $app_version)}
|
|
validate:
|
|
- eq: ["status_code", 0]
|
|
- len_eq: ["content.token", 12]
|
|
- contains: [{"a": 1, "b": 2}, "a"]
|