Forum Discussion
testerA
13 years agoOccasional Contributor
I was able to loop through the other test files, using this code. Thank you for your help.
/*
@Description : Data Source Looper responsible for looping a specific teststep.
@GroovyTestStepName : "GroovyScript-SaveDataSource"
*/
def myTestCase = context.testCase
def runner
propTestStep = myTestCase.getTestStepByName("Properties-Looper") // get the Property TestStep
endLoop = propTestStep.getPropertyValue("StopLoop").toString()
if (endLoop.toString() == "T" || endLoop.toString()=="True" || endLoop.toString()=="true")
{
"sleep(100000000000000000000000000000000)"
log.info ("Exit Groovy Data Source Looper")
assert true
}
else
{
"sleep(100000000000000000000000000000000)"
testRunner.gotoStepByName("GroovyScript-DataSource_Save")
testRunner.gotoStepByName("GroovyScript-DataSource_Contact")
testRunner.gotoStepByName("GroovyScript-DataSource_Mobile")
testRunner.gotoStepByName("GroovyScript-DataSource_Service")
testRunner.gotoStepByName("GroovyScript-DataSource_Work")
testRunner.gotoStepByName("GroovyScript-DataSource_Callback")
//setStartStep
}