there are situations when I want to set the test case status as NOTRUN or ABORTED so I can do testCaseContext.getTestCaseStatus() in the testListenerAfterTestCase.
how to achieve that?
there are situations when I want to set the test case status as NOTRUN or ABORTED so I can do testCaseContext.getTestCaseStatus() in the testListenerAfterTestCase.
how to achieve that?
I’m also looking for this kind of solution.
I’ve experimented with System.exit(0) but it’s not the right option to achieve that.
@SetupTestCase(skipped = false) // Please change skipped to be false to activate this method.
def setupTestCase() {
// Put your code here.
if (GlobalVariable.testCaseStatus == "FAILED"){
System.exit(0)
}
}
Reports are still generated.