Forum Discussion
rafalk128
16 years agoOccasional Contributor
Sure... ignore the if count>5 .. as you can see i'm new to Groovy ...
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
holder = groovyUtils.getXmlHolder("Products1#Response" )
def targetStep = testRunner.testCase.getTestStepByName( "Products2" );
count = 0
for( url in holder["//Response/Product/ConfigToken"] )
{
if (count >5) return; count++
targetStep.setPropertyValue( "configToken", url);
targetStep.run(testRunner, context);
}
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
holder = groovyUtils.getXmlHolder("Products1#Response" )
def targetStep = testRunner.testCase.getTestStepByName( "Products2" );
count = 0
for( url in holder["//Response/Product/ConfigToken"] )
{
if (count >5) return; count++
targetStep.setPropertyValue( "configToken", url);
targetStep.run(testRunner, context);
}