Donkey2017
8 years agoOccasional Contributor
script assertion
Hi, not being a programmer could anyone suggest a way to check if the property "apples" has a number rather than just null for example. So below is the result of running a test. I can easily ask SOAP...
- 8 years ago
//Below Script Assertion should do the job
def json = new groovy.json.JsonSlurper().parseText(context.response) //check id is number assert json.CONTENT.id instanceof Integer, 'id is not integer type' assert 0 < json.CONTENT.id, 'id is not a positive number'