SankarB
8 years agoOccasional Contributor
How to get the item count
Hi, How do i get the count of items for the below JSON response { "@type": "com.a.common.model.dto.CollectionDTO", "id": null, "items": [ { "@type": "com.a.b.client.model.dto.Asset", ...
- 8 years ago
Add Script Assertion with below code:
assert context.response, "Response is empty or null" def json = new groovy.json.JsonSlurper().parseText(context.response) log.info json.items.size()
- 8 years ago
Try replacing [i] with [$i] to reference the value as a number instead of a string.