How to set test case status to NOTRUN or ABORTED?

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?

1 Like

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"){

Reports are still generated.

1 Like