I would like to iterate through an x amount of Test Steps and extract an XML value in Groovy
I have found something on StackOverflow that has worked and actually extracted the value. However, I was unable to implement a loop.
Here's a link! I found which was really useful; still I could not implement.
This is the script that I had found on here is :
def project = testRunner.testCase.testSuite.project ;
def tcase =
project.testSuites["Testsuite_name"].testCases["TestCase Name"] ;
def tstep = tcase.getTestStepByName("TestStep");
def responseTestSuite1 = tstep.getPropertyValue("response");
log.info(responseTestSuite1.toString());
def gutils = new com.eviware.soapui.support.GroovyUtils( context );
def holder = gutils.getXmlHolder("$responseTestSuite1");
def byteResponse = holder.getNodeValue("//*:number")
The Output of this is : Script-result : 023903122
The answer can be found here!
If anyone could help that would be great !
iterate through an x amount of Test Stepsis confusing. Please clarify. Use edit question to update. - Rao