Forum Discussion
Unhandled
14 years agoContributor
I am unaware of a way to do this using the native soapUI interface. However, you could get the same functionality with a Groovy Test Step.
Insert a Groovy Test Step after the test step of which you want to check status.
In the Groovy Test Step, insert something like the following. This script will transfer execution of a test case to an arbitrary test step if the previous test step failed.
Insert a Groovy Test Step after the test step of which you want to check status.
In the Groovy Test Step, insert something like the following. This script will transfer execution of a test case to an arbitrary test step if the previous test step failed.
def lastResult = testRunner.getResults().last()
def lastResultName = lastResult.getTestStep().getLabel().toString()
def lastResultStatus = lastResult.getStatus().toString()
log.info 'Test Step [' + lastResultName + '] status: ' + lastResultStatus
if( lastResultStatus == 'FAILED' )
{
myGotoStepName = 'Other TestStep Name'
log.info 'Goto step [' + myGotoStepName + ']'
testRunner.gotoStepByName( myGotoStepName )
}
else
{
log.info 'Continue to next step'
}