Forum Discussion
JHunt
6 years agoCommunity Hero
Hi,
I don't know if that's possible with JsonPath Match assertion (I haven't used it much), but here's how you can do it with a Script assertion:
def result = new groovy.json.JsonSlurper().parseText(context.response).'result'
assert result > 0
- chathurad6 years agoContributor
oops, This is not possible with the given UI,
To perform you suggestion i have to use script assertion.`
JHunt wrote:
Hi,
I don't know if that's possible with JsonPath Match assertion (I haven't used it much), but here's how you can do it with a Script assertion:
def result = new groovy.json.JsonSlurper().parseText(context.response).'result'
assert result > 0
Related Content
- 5 years ago
- 10 years ago