ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
Passing false positive API functional test
Article ID: 224873
Sometimes you want a test to pass even though one of the API calls fails, e.g. with a 'Bad Gateway' error. The assertion has been setup properly to catch the error but still the test fails. How to overcome this.
An API Functional test results in a JMeter script to be created. It is contained in the Artifacts.zip that is downloadable from your test result. If you open it and verify the assertion you see:
As you can see, the Ignore Status field is not checked. Here is what JMeter says about that field:
It would have to be enabled in order for the sampler to be marked as successful if the assertion passes (which it did).
BLAZEMETER FUNCTIONAL TESTING
There is no option that lets you enable the "ignore status" field in the API Functional GUI. The only way to achieve it would be to switch to the editor"
(</> instead of UI) and modify the generated Taurus yml: in the assert
you would need to add the 'assume-success: true' attribute as described in this article.