Hi,
If you want the script to stop executing after calling testRunner.fail(), you will need to manually do this by returning from the script:
log.info("Start test")
if( shouldFailTest ) {
testRunner.fail("Fail test")
return
}
//If the test is failed, this line won't be run.
log.info("End test")
As for the second part of your post, this is the behavior of soapUI. If a TestCase fails, an exception is thrown, regardless of the reason of failure. You say that this is undesirable, what would you prefer to happen in this scenario?
Regards,
Dain
SmartBear Software