Forum Discussion
davecoleman
4 years agoContributor
Working through a Proof of concept i have come up with the below solution:
- A groovy script goes to each testcase as per the testcase Identifier in the data source.
Datasource excel
Groovy to decide on which step to go to:
import com.eviware.soapui.support.XmlHolder
def testcaseNo = context.expand('${Data Source#TestcaseId}')
log.info (testcaseNo)
if (testcaseNo=="test001")
{
log.info ("go to test step: " + testcaseNo)
testRunner.gotoStepByName (testcaseNo)
}
else if (testcaseNo=="test002")
{
log.info ("go to test step: " + testcaseNo)
testRunner.gotoStepByName (testcaseNo)
}
else if (testcaseNo=="test003")
{
log.info ("go to test step: " + testcaseNo)
testRunner.gotoStepByName (testcaseNo)
}
else if (testcaseNo=="test004")
{
log.info ("go to test step: " + testcaseNo)
testRunner.gotoStepByName (testcaseNo)
}
else if (testcaseNo=="test005")
{
log.info ("go to test step: " + testcaseNo)
testRunner.gotoStepByName (testcaseNo)
}
Groovy after each step to move to the loop and start again on next row:
import com.eviware.soapui.support.XmlHolder
testRunner.gotoStepByName ("Data Source Loop")
log.info ("moved to the Data Source Loop")It will work for myself but there may be better solutions out there.