The below is my response..
{"activation":{"existing":false, "customer": new}}
Now when I use
testRunner.testCase.getTestStepByName("xxx").getPropertyValue("response")
The above script is extracting the response. Now I wanted to extract "customer"
value.
How to do this?
Thanks
import groovy.json.JsonSlurper
responseContent = testRunner.testCase.getTestStepByName("xxx").getPropertyValue("response")
slurperresponse = new JsonSlurper().parseText(responseContent)
log.info (slurperresponse.activation.customer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With