# How can I add action when test fails?

**URL:** <https://forum.katalon.com/t/how-can-i-add-action-when-test-fails/84239>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [February 11, 2023, 3:06pm UTC](https://forum.katalon.com/t/how-can-i-add-action-when-test-fails/84239 "2023-02-11T15:06:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [February 11, 2023, 5:46pm UTC](https://forum.katalon.com/t/how-can-i-add-action-when-test-fails/84239/2 "2023-02-11T17:46:18Z")

</div>

Perhaps the below might help you, but as mentioned in the answers, there can be multiple reasons why a step might fail? I just read the Console log myself.

> [@Test Case failure handling/options](http://forum.katalon.com/t/test-case-failure-handling-options/83697):
>
> Hey folks, Is there a quick way to write a code that handles test case failure and can take another actionn when a test case fails? So I know I can use “CONTINUE\_ON\_FAILURE” on every step… but looking for a Test Case solution. Something in this method: If this test case fails then {call on test case 2} or something like if this testcase fails then {delete the data created}

---

_[View the full topic](https://forum.katalon.com/t/how-can-i-add-action-when-test-fails/84239)._
