anu
16 years agoOccasional Contributor
Running a Test Case from groovy script
Hi Ole
I want to run a test case. For that I have coded the following. But, I get compilation error. Can you pl. help me
testRunner.getTestCase().getTestStepByName("Step getSessionid").run(testRunner, context);
println("Finished Executing:");
List stepResult=testRunner.getResults()
Iterator j=stepResult.iterator();
while (j.hasNext())
{
TestStepResult result=(TestStepResult)j.next();
println("result:"+result.getStatus())
}
The error is in "TestStepResult result=(TestStepResult)j.next();"
Also can you explain me why is testrunner being passed as parameter in the run method?
Thanks
Anu
I want to run a test case. For that I have coded the following. But, I get compilation error. Can you pl. help me
testRunner.getTestCase().getTestStepByName("Step getSessionid").run(testRunner, context);
println("Finished Executing:");
List stepResult=testRunner.getResults()
Iterator j=stepResult.iterator();
while (j.hasNext())
{
TestStepResult result=(TestStepResult)j.next();
println("result:"+result.getStatus())
}
The error is in "TestStepResult result=(TestStepResult)j.next();"
Also can you explain me why is testrunner being passed as parameter in the run method?
Thanks
Anu