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

@@ -2,6 +2,10 @@
## 3.1.1 (2020-06-21)
**Added**
- feat: add optional message for assertion
**Fixed**
- fix #942: type_match None

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 KiB

After

Width:  |  Height:  |  Size: 369 KiB

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.