Forum Discussion
- BuschfunkFrequent ContributorFound the solution:
def result = testRunner.getStatus()
if (result == com.eviware.soapui.model.testsuite.TestRunner.Status.valueOf("FINISHED")) {
log.info("Test passed")
} else {
log.info("Test not passed")
}
ordef result = testRunner.getStatus().toString()
if (result == "FINISHED") {
log.info("Test passed")
} else {
log.info("Test not passed")
}- vikititorContributor
I am sorry, but this gives me always "RUNNING" when I try to execute test..
So there is really no way.. how to in side TC get status?
Thanks a lot.. I am lost after few hours to found solution..
- vikititorContributor
This works only in tear donw script.. but not in groovy test step.. In groovy test step you will get only "RUNNING"..
- BuschfunkFrequent ContributorI've found the following code line which gives me the status of the test case.
def result = testRunner.getStatus()
However the following does not work:
def result = testRunner.getStatus()
if (result == "FINISHED") {
log.info("Test passed")
} else {
log.info("Test not passed")
}
Nothing is written to the script log.
Related Content
- 7 years ago