Forum Discussion
meital
9 years agoNew Contributor
attached
PaulMS
9 years agoSuper Contributor
Try clicking the select from current button, this shows <VALUE2/> as the expected result so you could copy that into the test case property.
- wujianyy9 years agoContributor
you can select "Script Assertion" to verify some json elements at same time. xml is same. please try research it. This solutions is more flexible.
import groovy.json.JsonSlurper
def responseMessage = messageExchange.response.responseContent
def jsonSlurper = new JsonSlurper().parseText(responseMessage)//verify the Json object isn't empty
assert !(jsonSlurper.isEmpty())
log.info jsonSlurper