Failure Conditions
Failure conditions in KaneAI allow you to define how the test execution in a Test Run should behave when a particular test step fails. These conditions give you fine-grained control over how failures are handled at the step level and how they impact the overall execution result.
Failure conditions are configurable for every type of command or step in KaneAI Authoring mode and are essential for aligning your tests with your quality and failure tolerance.
Failure conditions are set in the Authoring mode but they are applicable only in Test Run your Test's flow while authoring & code generation will not be affected by this.
Below are the failure conditions available in KaneAI:
-
Fail test immediately: If the step fails, the test execution is halted immediately, and the overall test status is marked as
Failed
. This ensures that no further steps are executed after a critical failure. This is ideal for scenarios where proceeding further does not make sense or could lead to misleading results. -
Fail but continue execution: If the step fails, the test execution continues with the remaining steps, but the overall test is marked as
Failed
after completion. This is useful when you want to capture all failures in a single run for debugging purposes, but still treat the test as failed overall. -
Warn but continue execution: If the step fails, the test execution continues with the remaining steps and the overall test result remains
unaffected
. This is particularly useful for non-critical validations where failure should not impact the test outcome.
You can set the failure condition in the Authoring mode by clicking on the three-dots on the step:

This change will not affect your existing test cases or the generated code where you’ve used hard/soft assertions. However, when you edit these tests, the new failure conditions will be applied.
Default Failure Condition Setting
By default, the failure condition for each step is set to Fail test immediately, ensuring that the execution stops as soon as a step fails.
The default failure condition can be configured at the Organization level within the Org Product Preferences section of Organization settings, here.

These settings will be applied to all the new tests being created in that Organization & can only be edited by the Admins of the Organization.
If you are transitioning from a Hard & Soft Assertions approach, think of Fail test immediately as your Hard Assertion, which halts on assertion failure, and Warn but continue execution as your Soft Assertion, which logs the failure but continues execution.