Vivek_Malhotra
8 years agoOccasional Contributor
Repeat a Test Step until you get desired response and then move to next step.
Hi, I have a requirement where I am querying using a GET Request or say a DB select. This is async service which returns me a state say "in-progress" . Then I added a step called delay with 2 se...
- 8 years ago
def response = context.expand( '${TestStep_101#Response}') def holder = new com.eviware.soapui.support.XmlHolder(response) if (holder) { def isRetry = true while(isRetry) { def state = holder.getNodeValue('//*:payments/*:payment-state') log.info "value of state in the response is ${state}" if (state == 'success') { log.info "Since the value is success, setting value of isRetry to false" isRetry = false } else { log.info "Retring as state is not success" testRunner.runTestStepByName('TestStep_101') } } }
Please check if the above script helps.