What is Failure Handling in Katalon?
Failure handling settings allow users to specify whether Katalon Studio should continue running in the event of an error during execution.
Katalon Studio currently supports the following failure-handling options:
Continue on Failure: Katalon Studio will continue regardless of any errors that occur during its execution. The step with errors will be marked as Failed.
Stop on Failure: If an error occurs, Katalon Studio will halt execution. The step with errors will be marked as Failed.
Optional: Katalon Studio will continue regardless of any errors that occur during its execution. The step with errors will be marked as a Warning.
Default handling of failures
- Follow these steps to define the default failure-handling behavior that will be used throughout your project:
Choosing a Global Software Development Partner to Accelerate Your Digital Strategy
To be successful and outpace the competition, you need a software development partner that excels in exactly the type of digital projects you are now faced with accelerating, and in the most cost effective and optimized way possible.
From the Katalon Studio menu, access Project > Settings > Test Design > Test Case.
- Select the preferred option for the Failure Handling default behavior. When you’re finished, click OK.
Only new test steps will be affected by the option chosen. This change has no effect on the failure handling options for steps that already exist in your test cases. As a result, you may need to manually update them.
Override failure handling behavior
You can manually override the default failure handling behavior for each test step in either the Manual or Scripting views of the test case.
- To open the context menu for the step where you want to change the failure handling behavior, right-click on it.
- Select the preferred failure handling option and save your test case.
In Scripting View
FailureHandling can be added as the final parameter to any built-in keyword in Katalon Studio. Use any of these options to specify the behavior of a keyword when editing it in Scripting mode.
FailureHandling.STOP_ON_FAILURE FailureHandling.CONTINUE_ON_FAILURE FailureHandling.OPTIONAL
Using the above method, it gets very convenient to overcome failure handling in Katalon studio.