We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Predicates with numbers such as (equals, greaterThan, ...) are "arithmetic".
For example: for the following json response
{ "count": 5, "total": 50.0 }
All the following asserts are valid
jsonpath "$.count" equals 5 jsonpath "$.count" equals 5.0 jsonpath "$.count" greaterThan 1 jsonpath "$.count" greaterThan 1.0 jsonpath "$.total" equals 50 jsonpath "$.total" equals 50.0 jsonpath "$.total" greaterThan 0.2 jsonpath "$.total" greaterThan 0
The value type can be checked with an additional predicate
jsonpath "$.count" isInteger jsonpath "$.total" isFloat
Additional:
The intent for the following assert might not be clear: jsonpath "$.count" equals 5.0 Do we expect a float value?
jsonpath "$.count" equals 5.0
In this case, Hurl could emit a warning like: "You expected value should be replaced by an integer value"
The text was updated successfully, but these errors were encountered:
👍
Sorry, something went wrong.
implemented in #99
No branches or pull requests
Predicates with numbers such as (equals, greaterThan, ...) are "arithmetic".
For example:
for the following json response
All the following asserts are valid
The value type can be checked with an additional predicate
Additional:
The intent for the following assert might not be clear:
jsonpath "$.count" equals 5.0
Do we expect a float value?
In this case, Hurl could emit a warning like:
"You expected value should be replaced by an integer value"
The text was updated successfully, but these errors were encountered: