We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Hi Jan,
You should use
testRunner.getResults()
For instance, in a TestCase Teardown script:
Map resultOf = testRunner.getResults()
.collectEntries { result -> [ (result.testStep): result.status ] }
def mystep = context.getTestCase().getTestStepByName("Some step")
log.info resultOf[myStep]
In the attached project is another TestCase Teardown example, and an example of how to get the results from a TestSuite Teardown script.
Hi Jan,
You should use
testRunner.getResults()
For instance, in a TestCase Teardown script:
Map resultOf = testRunner.getResults()
.collectEntries { result -> [ (result.testStep): result.status ] }
def mystep = context.getTestCase().getTestStepByName("Some step")
log.info resultOf[myStep]
In the attached project is another TestCase Teardown example, and an example of how to get the results from a TestSuite Teardown script.
The nice thing to observe with the TestSuite TearDown script is that...
runner.getResults()
... actually returns a list of TestCaseRunners.
These are the exact same runners that appear in the individual TestCase TearDown scripts as the testRunner variable.
Thanks very much, it is just too super !
I first did it in Test case TearDown, and it worked wonderfully... After when I changed it for TestSuite, it was even better :-)
Much appreciated help.
It worked exactly the same way which i was expecting. Thanks for writing this.