You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i first request it with curl and jq to check that the json response is valid:
$ curl --silent http://localhost:8080 | jq -r .items[].item
a
b
i create a test.hurl file with a jsonpath collection assert (validated with external tools):
GET http://localhost:8080
HTTP/1.1 200
[Asserts]
jsonpath "$.items.[*].item" includes "a"
i run hurl
$ hurl --version
hurl 1.1.0
$ hurl test.hurl --verbose
* fail fast: true* insecure: false* follow redirect: false* max redirect: 50
* ------------------------------------------------------------------------------
* executing entry 1
** Cookie store:
** Request
* GET http://localhost:8080
*> GET / HTTP/1.1
> Host: localhost:8080
> Accept: */*> User-Agent: hurl/1.1.0
>< HTTP/1.1 200 OK
<* Response Time: 43ms
*
error: Invalid jsonpath
--> test.hurl:6:10
|
6 | jsonpath "$.items.[*].item" includes "a"| ^^^^^^^^^^^^^^^^^^ the jsonpath expression '$.items.[*].item' is not valid
|
i try with another valid jsonpath such as "$.items.[]item" but got the same error ... something seems to be wrong with the jsonpath parser used in hurl because I get the same error even using your documentation example at https://hurl.dev/docs/asserting-response.html#jsonpath-assert:
error: Invalid jsonpath
--> hurdev-jsonpath-example.hurl:9:10
|
9 | jsonpath "$.slideshow.slides[*].title" includes "Mind Blowing!"| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the jsonpath expression '$.slideshow.slides[*].title' is not valid
|
The text was updated successfully, but these errors were encountered:
i create a simple fake api returning a json collection with netcat on port 8080:
i first request it with curl and jq to check that the json response is valid:
$ curl --silent http://localhost:8080 | jq -r .items[].item a b
i create a test.hurl file with a jsonpath collection assert (validated with external tools):
i run hurl
i try with another valid jsonpath such as
"$.items.[]item"
but got the same error ... something seems to be wrong with the jsonpath parser used in hurl because I get the same error even using your documentation example at https://hurl.dev/docs/asserting-response.html#jsonpath-assert:The text was updated successfully, but these errors were encountered: