Forum Discussion
SmartBear_Suppo
Alumni
15 years agoHello,
What about if you instead of doing this at the end of the test do it after every request? For instance, add a TestRunListener.afterStep event handler with the following code:
Since this will run directly after each test, it will run once for each loop execution. Good luck!
Regards,
Dain
eviware.com
What about if you instead of doing this at the end of the test do it after every request? For instance, add a TestRunListener.afterStep event handler with the following code:
def st = testStepResult.testStep
if (st instanceof com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep)
{
log.info("endpoint: " + st.testRequest.getEndpoint())
log.info("soap request: " + st.testRequest.requestContent)
log.info("soap resposne: " + st.testRequest.responseContent)
String assertMessage = ""
for(def i=st.assertionCount-1; i>=0; i--)
{
def a = st.getAssertionAt(i)
assertMessage = assertMessage + a.label + ": " + a.status + "\n"
}
log.info("assertion: " + assertMessage)
}
Since this will run directly after each test, it will run once for each loop execution. Good luck!
Regards,
Dain
eviware.com