The response I get has a JSON body.
This JSON has several arrays contained within.
During the check of the request I need to validate the amount of elements in each such array to make sure it is as expected.
If I do the following:
.check(
status is 200,
jsonPath("$.config.userPrivileges[0]").findAll.productIterator.length == 10
)
This code is not accepted as the second line in the check returns a Boolean and not an HttpCheck object.
It is critical that if the amount of elements is not consistent with the expected, that I fail the request. As a result it is not useful for me to save the Seq to the session and process it over an additional exec.
I see there is a @.length API in jsonPath though whatever query I use I can’t seem to get that value…
Thanks in advance