Forum Discussion
SmartBear_Suppo
Alumni
12 years agoIn that for loop for(x in 0..10), x will not have value 11. So it seems like the if(x==11) clause won't be executed.
It seems like you are setting property value 11 times (x = 0 through 10), then 1 more time (11th time) before you run the TestSteps after the loop.
In that case you can close the loop after if(x==10). Check the suggestion below.
It seems like you are setting property value 11 times (x = 0 through 10), then 1 more time (11th time) before you run the TestSteps after the loop.
In that case you can close the loop after if(x==10). Check the suggestion below.
...
if (x==9){
testRunner.testCase.testSuite.setPropertyValue("AccType", "B")
}
if (x==10){
testRunner.testCase.testSuite.setPropertyValue("AccType", "Q")
}
}//end for loop
//continue script
testRunner.testCase.testSuite.setPropertyValue("AccType", "X")
testRunner.runTestStepByName("DataGen")
testRunner.runTestStepByName( "Groovy Script")
testRunner.runTestStepByName("ClosingDate groovy")
testRunner.runTestStepByName( "Authheader _A_B")
testRunner.runTestStepByName( "PropertyTransfer 1")
testRunner.runTestStepByName( "Create P504b_i_A_B")
//end script