feat: add optional message for assertion

This commit is contained in:
debugtalk
2020-06-23 11:11:05 +08:00
parent 286dbbfe55
commit d11aca83c0
9 changed files with 158 additions and 91 deletions

View File

@@ -175,10 +175,11 @@ Extract JSON response body with [jmespath][jmespath].
Extract JSON response body with [jmespath][jmespath] and validate with expected value.
> assert_XXX(jmes_path: Text, expected_value: Any)
> assert_XXX(jmes_path: Text, expected_value: Any, message: Text = "")
- jmes_path: jmespath expression, refer to [JMESPath Tutorial][jmespath_tutorial] for more details
- expected_value: the specified expected value, variable or function reference can also be used here
- message (optional): used to indicate assertion error reason
The image below shows HttpRunner builtin validators.