# KeywordUtil.markFailed method

**URL:** <https://forum.katalon.com/t/keywordutil-markfailed-method/6027>\
**Category:** Miscellaneous\
**Tags:** katalon-studio\
**Created:** [May 4, 2017, 12:21pm UTC](https://forum.katalon.com/t/keywordutil-markfailed-method/6027 "2017-05-04T12:21:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marek\_Melocik](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marek_melocik/32/371_2.png) [@Marek\_Melocik](https://forum.katalon.com/u/Marek_Melocik)\
**Post date:** [May 4, 2017, 12:21pm UTC](https://forum.katalon.com/t/keywordutil-markfailed-method/6027/1 "2017-05-04T12:21:30Z")

</div>

Hello, when I use KeywordUtil.markFailed() method, it shows only first fail in execution log. I am wondering if it is possible to log FAILED message each time I call markFailed().

Example:

![](https://i.imgur.com/5IIQ5uy.png)

Only first occurrence of markFailed() can be seen. It’s hard to determine in long tests how many markFailed() methods were invoked. How can I solve such a case? Thank you.

---

<div class="post-metadata">

**Author:** ![Marek\_Melocik](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marek_melocik/32/371_2.png) [@Marek\_Melocik](https://forum.katalon.com/u/Marek_Melocik)\
**Post date:** [May 5, 2017, 12:32pm UTC](https://forum.katalon.com/t/keywordutil-markfailed-method/6027/2 "2017-05-05T12:32:45Z")

</div>

I believe I found a solution for such a problem. There is a class called KeywordLogger, which can write into a log. So just create an instance of it and call logFailed() method.

`KeywordLogger log = new KeywordLogger()`  
`log.logFailed("Failed 1")`  
`log.logFailed("Failed 2")`  
`log.logFailed("Failed 3")`

There are 3 FAILED level logs after execution. And that’s it. 🙂

---

<div class="post-metadata">

**Author:** ![Marek\_Melocik](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marek_melocik/32/371_2.png) [@Marek\_Melocik](https://forum.katalon.com/u/Marek_Melocik)\
**Post date:** [May 4, 2017, 5:15pm UTC](https://forum.katalon.com/t/keywordutil-markfailed-method/6027/3 "2017-05-04T17:15:24Z")

</div>

Hi Hung,

yes, I have set up FailureHandling as Continue on failure, so the test case would finish even when there is some failure. I used markFailed on purpose, because there is also markFailedAndStop method, which makes the test stop immediately.

Even this sample test has finished. Please see whole log: (sorry, img tag suddenly stopped working here)

`http://i.imgur.com/9XOGyqR.png`

All markFailed methods were invoked, but only **Failed 1** message is shown in a log. I’d like to view all 3 messages, this is my original question. Thanks!
