KeywordsUtil.markFailedAndStop marks the failed test-step as passed, while marking the test-case as a whole failed.

Updated from 6.1.0 to 6.1.4 today, mainly because of the following fixes in 6.1.2:

  • Highlighted test steps that call markFailed
  • Fixed a bug that caused the last step to by marked as failed if any previous steps had failed

Might these fixes have effected markFailedAndStop in anyway? Not sure if it’s related or if this is intended but to me it looks wrong/inconsistent. In the picture below the test-step results in a markFailedAndStop, as you can see the actual test-step that failed is marked as passed, while the test-case itself is marked failed. In addition, the failed message is not printed on he actual test-step, but on the test-case level.

The behavior I actually expected from markFailedAndStop I get by calling, markFailed(message) first, then markFailedAndStop().:

Am I wrong in assuming markFailedAndStop should behave exactly as markFailed, with the only difference being it actually stopping the test-case from continuing?

1 Like

I’m having the same issue. I’m having to put a markFailed() line first to get the failed test step followed by an additional and redundant markFailedAndStop() line to kill the run. Has this been addressed by Katalon?

Not to my knowledge, currently running 6.2.1 and the behavior is still the same.

Been using:
KeywordUtil.markFailed(message)
KeywordUtil.markFailedAndStop()

As a workaround since I created this thread.