Taurus fails my test if at least 1 error happens

45 views Asked by At

If at least one error is returned from the server during the test execution, the final status of the test is set to 'fail'. I am sending quite a lot of requests during the test execution and a small percentage of errors is expected. Is there any way to prevent them from failing the whole test?

Screenshot of the fail status

I tried to set custom Pass/Fail criteria on the scenario level but it did not help:

criteria:
    - fail of my-label>3% for 30s, stop as failed

It feels like some default Pass/Fail criteria are defined and I can not override them.

Any help would be appreciated.

1

There are 1 answers

3
Dmitri T On

I fail to see where does Taurus sets the status of the test to "fail"

enter image description here

Even if there is 50% of failures and there are no Pass/Fail criteria set Taurus returns zero exit status code which means "success"

If you want to set a specific request status to OK no matter whether it failed or not in reality it can be done using JSR223 Block

jsr223:
  execute: after
  script-text: prev.setSuccessful(true)

More information on Groovy scripting in JMeter: Apache Groovy: What Is Groovy Used For?