mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-07 16:59:34 +08:00
refactor variable context:
1, variable context has two level, testset and testcase; 2, testset level variables can be used in whole test suite, while testcase level variables can only be used in testcase; 3, when variable binds with functions, the funtions will be called and the result will be set to the variable.
This commit is contained in:
@@ -41,11 +41,11 @@ class TestRunner(ApiServerUnittest):
|
||||
"password": "123456"
|
||||
}
|
||||
},
|
||||
"extract_binds": {
|
||||
"resp_status_code": "status_code",
|
||||
"resp_body_success": "content.success",
|
||||
"resp_headers_contenttype": "headers.content-type"
|
||||
},
|
||||
"extract_binds": [
|
||||
{"resp_status_code": "status_code"},
|
||||
{"resp_body_success": "content.success"},
|
||||
{"resp_headers_contenttype": "headers.content-type"}
|
||||
],
|
||||
"validators": [
|
||||
{"check": "resp_status_code", "comparator": "eq", "expected": 200},
|
||||
{"check": "resp_body_success", "comparator": "eq", "expected": False},
|
||||
|
||||
Reference in New Issue
Block a user