Forum Discussion
PaulDonny
12 years agoRegular Contributor
It is because you are using GoToStep. Try runTestStepByName
The API explains how the GoToTestStepByName transfers the testRunner to that step and then it will continue to run. RunTestStepByName will just run that step.
Also, disabling the steps would be important. If not the test runner will just go on to the next step.
PS. Once your testRunner hits any of your clauses, the testRunner goes to that step immediately and will not return to your groovy script so everything following would not be executed. I will just post what is being ignored:
The API explains how the GoToTestStepByName transfers the testRunner to that step and then it will continue to run. RunTestStepByName will just run that step.
Also, disabling the steps would be important. If not the test runner will just go on to the next step.
PS. Once your testRunner hits any of your clauses, the testRunner goes to that step immediately and will not return to your groovy script so everything following would not be executed. I will just post what is being ignored:
If (A==1 && B!=1 && C!=1 && D!= 1)
{
testRunner.goTotestStep("TestRequest1")
}
else if (A==1 && B==1 && C!=1 && D!= 1)
{
testRunner.goTotestStep("TestRequest1")
testRunner.goTotestStep("TestRequest2")//This line is completely ignored. testRunner left the groovy script already and went to TestRequest1
else if (A==1 && B==1 && C==1 && D!= 1)
{
testRunner.goTotestStep("TestRequest2")//Anything below this will be ignored. testRunner left the groovy script already and went to TestRequest2
..
..
..
..else {
testRunner.gotoStepByName("End")
}