Why is the status of the skipped test case is "pass" result of the Report?

Hi,

Preconditions:

  • There are 8 test cases have been created
  • There is a test suite which contains 8 test cases above
  • Katalon version 6.2.2 is installed

Steps to reproduce:

  • Skip test case in the test suite in precondition by using Test Listener
  • Run the test suite
  • Verify the status of 8 test cases in generated html report (under Reports folder)

Expected Behavior:
The status of html report should specify that 1 test case failed and 7 skipped

Actual Behavior: The status in html report is:
Status: 8 test total, 7 passed, 1 failed, 0 error, 0 incomplete

Screenshot

I want to see if there is a skip status in the report or a function that will modify the status value of the report.

If there is no feature, will it be added to the feature in the future release?

If you provide us with the following information, it would be helpful in our monitoring project.

Best regards,

Beomseok

please fix

I have the same problem here!

I have created a global variable which saves the test status value and set the following script on the setupTestCase to check the status of the previous test until run

def setupTestCase() {
	// Put your code here.
	if(GlobalVariable.TestCaseStatus=="FAILED" || GlobalVariable.TestCaseStatus=="ERROR"){
		KeywordUtil.markFailedAndStop('ERROR: The previous test fail')
		
	}
}

The test case gets marked as fail but the .testCaseStatus() when the test end keeps throwing a “PASSED” status value!!

@Beomseok_Park how you get your test as skipped?

Within your Listener you can:

  1. Assign the status of the test case to a global variable.
    GlobalVariable.skip = (status != 'PASSED') ? true : false

  2. Then, (to answer your question) conditionally skip subsequent test cases based on that variable.

    if (GlobalVariable.skip) { testCaseContext.skipThisTestCase() }