Reputation: 207
I want to set up some tests but cannot set up a summary report where I can see the failed tests.
Example: I want to check that the API response headers and body are correct for test-case with status=400.
Setup: an HTTP Request with one or more Response Assertions.
What I see in the Summary report: despite that all assertions were satisfied, the call has been tagged as an error (due to 400 status).
If I flag "Ignore Status" in the Response Assertion, the 400 response is not tagged as an error but if the assertion about the error code is not matched, the Summary Report does not note the failure.
A report where is tracked how many tests failed based on (not satisfied) assertions and not on the HTTP status of the response. How can I get this?
Upvotes: 0
Views: 15
Reputation: 168072
You will need to go for several Response Assertions
Check that status code is 400 and don't mark the request as failed
Check that the response contains the anticipated text:
In this case:
400
some text which has to be present
won't be found in the responseIf the response code is 400
and some text which has to be present
is found the sampler will be marked as passed.
More information: What Are JMeter Response Assertions?
Upvotes: 1