mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
#52: validator expect field support reference variable
This commit is contained in:
@@ -11,11 +11,14 @@
|
||||
app_version: '2.8.6'
|
||||
json:
|
||||
sign: f1219719911caae89ccc301679857ebfda115ca2
|
||||
variables:
|
||||
- expect_status_code: 200
|
||||
- token_len: 16
|
||||
extract:
|
||||
- token: content.token
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
- len_eq: ["$token", 16]
|
||||
- eq: ["status_code", $expect_status_code]
|
||||
- len_eq: ["$token", $token_len]
|
||||
- len_eq: ["content.token", 16]
|
||||
- {"check": "status_code", "comparator": "eq", "expect": 200}
|
||||
- sum_status_code: ["status_code", 2]
|
||||
|
||||
Reference in New Issue
Block a user