Fail on purpose test

In the bug report, I want to be shown fail test case, I do it on purpose just to see if it works, and all I get is error(yellow column) instead red(fail).

Here Null Pointer exception,
in the API request I did on purpose, to fail the test retrieving 400 not 200, and also I have another validation for a field which is also wrong, so the test can fail. How to solve this?
Thanks,
in advance.
Elena.

There’s an important distinction between a “failure” and an “error” in Katalon:

  • A test case will be marked as “failed” if, at any point, an uncaught StepFailedException is thrown. This is a custom exception within Katalon that occurs when an assertion of some kind fails. You can test this yourself. Put this in your code and notice that the script will fail (not error): assert false

  • A test case will be marked as “error” if, at any point, an uncaught exception of any other kind is thrown. For example, a NullPointerException would cause this, as you’ve mentioned.

@Brandon_Hein,
thx for the answer.

I have one more question I do found how to be error and how to fail. Now I want to have analysis for few failed requests in the test suite and few passed cases. But why I only get 1 error case instead 2-3

I only get for the first error info for the first request from the suite, and from other failed/passed tests not . How do I get a pie from all tests in the suite what has passed(green half) what hasn’t.
Thanks.

Find out :slight_smile: every case should be separate and then in test suite multiple cases
here it is:


Now I have finally get a report :slight_smile: . I would prefer to be pie instead of line.