Stack trace error replaces the verification result

When executing verification in loop the result of last verification will be influenced by the stack trace error to be FAILED.

def expect = 1
for(def actual = 0; actual < 5; actual++){
if(expect < 4)
WebUI.comment(String.format(“actual = %d expect = %d”, actual, expect))
WebUI.verifyEqual(actual, expect, FailureHandling.CONTINUE_ON_FAILURE)

In the Log Viewer even though the last verification passed, the result is marked as failed on report.

Any ways to prevent this misleading result?

Let me add another example.

I have made a Github project:

You can reproduce the case with this code set.

How to reproduce the problem

  1. Download the zip of the project from Releases page.
  2. Unzip the zip, open it with your Katalon Studio.
  3. Select Test Cases/TC1 and run it.

Problem to solve

TC1 script has the following statement:

def verificationResult =
		findTestObject('Page_CURA Healthcare Service_top/a_Make Appointment'),
		'',   // this is a wrong URL

This statement will fail. This is intentional. This is not a prblem.

TC1 script has the followin statement at the end.


Nobody would expect that this statement to fail.

But, when you run the TC1 and you watch the Log Viewer, you will find Katalon Studio reports that the closeBrowser() failed!

See the following screenshot. screenshot

My thought

Of course, WebUI.closeBrowser() statement actually succeeds, does not fail.

The thing is, the StepFailedException raised by the previous verifyElementAttributeValue() statement is reported as if it was raised by the closeBrowser() .

Katalon Studio seems to have a problem in handling StepFailedException.


Please have a look at this