Forum Discussion
raptor
Occasional Contributor
I think see 100 photos.
The response I got contains 100 photos I think. I have attached it in a text file.
I validated it by pasting it here and then clicking on 'Viewer'.
nmrao
7 years agoChampion Level 3
Based on the attachment which is json, here is the Script Assertion:
//Check if there is response assert context.response, 'Response is empty or null' def json = new groovy.json.JsonSlurper().parseText(context.response) def actualPhotos = json.photos.photo.size() //log the photo instances log.info actualPhotos def expectedPhotos = 100 assert expectedPhotos == actualPhotos
Related Content
- 7 months agoḥari
- 2 years agoDesktopapptesti
- 2 years agoDesktopapptesti
Recent Discussions
- 7 days agoemoya