Setting Test Status & Exit Test Case Iteration from Runtime

Would like to have a feature to be able to setting the Test Execution Status during run time, and have the function to skip the test iteration. ie, can be called in Before/After TestListener. Found the testCaseContext.testCaseStatus at the TestCaseContext, the status can be printed correctly. However, the Test Report is still return as “PASSED”.

Eg:
def CompleteAfterTestCase(TestCaseContext testCaseContext) {

testCaseContext.testCaseStatus = ‘incomplete’

println testCaseContext.getTestCaseStatus()
// ExitTestIteration → Try to use System.exit(0), but this will fully exiting the Test… not a particular iteration
}

1 Like