Unanswered question

How can I mark a test failed if a validation fails

Hi guys,

I run a test that always succeeds because my service returns an empty string with http status code 200.

The validation fails, but I would like the report to state that the test failed because the validation failed. How can I do this?

Harv G.
Harv G.

Harv G.

Level
0
16 / 100
points

Answers

In order to change the status of the test to fail you can add an SLA per run based on the total error. The condition will be failed if the total of errors is higher than 1. Then apply that SLA at the scenario level. If you get an assertion error or any error then the test will have a status failed.