mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
feat: add optional message for assertion
This commit is contained in:
@@ -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 |
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user