im trying to get count / total number of records from list api using Restassured.
Please share thoughts on how can we get it.
ex:
{
"final list": [
{
"id": 123,
"name": "sachin"
},
{
"id": 234,
"name": "sourav"
}
]
}
I am expecting total as 2 here. please suggest.
I got answer to my question.
here is the code for rest assured
expect().body("final_list.findall.size()",equalTo(2)).when().get("/list.json);
thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With