mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
support both "validate" and "validators"
This commit is contained in:
@@ -267,7 +267,7 @@ class Runner(object):
|
||||
self.session_context.update_session_variables(extracted_variables_mapping)
|
||||
|
||||
# validate
|
||||
validators = test_dict.get("validate", [])
|
||||
validators = test_dict.get("validate") or test_dict.get("validators") or []
|
||||
try:
|
||||
self.session_context.validate(validators, resp_obj)
|
||||
except (exceptions.ParamsError, exceptions.ValidationFailure, exceptions.ExtractFailure):
|
||||
|
||||
Reference in New Issue
Block a user