How to stop test case in catch block

  1. callTestCase will throw StepFailedException or StepErrorException if the child test case (callee) has errors.
    Current: the parent test case (caller) always fails even users catch the right exception.
    Next release: the parent test case should fail if users don’t catch the exception and should pass if uses catch the exception.
  2. Yes. In next releases, users can get the root cause exception of StepFailedException or StepErrorException like the below example:
try {
    WebUI.callTestCase(findTestCase('Callee'), [:], FailureHandling.STOP_ON_FAILURE)
} catch (StepFailedException e) {
	println e.getCause()
}
1 Like