In JMeter, what does ticking Ignore Status on a Response Assertion do to a 500 sample?
answer
- A checkbox that rewrites a verdict
- It acts before the patterns run
- Meant for deliberate error-path testing
- The status range stops mattering
basics
~10 sIt forces the sample's status to successful before the assertion's patterns are evaluated. The 500 stops counting as an error, and if the patterns then match, the sample is reported green.
solid answer
~40 s**Ignore Status** is a checkbox on JMeter's Response Assertion, stored in the `.jmx` as `Assertion.assume_success` and defaulting to `false`. When it is ticked, `evaluateResponse` calls `response.setSuccessful(true)` before it inspects anything, so the sampler's own 200–399 verdict is discarded and the assertion's own patterns become the only rule left. That is its legitimate purpose: you tick it when a sampler is deliberately exercising a `4xx` or `5xx` path and you want your pattern, not the status range, to decide. Used to quiet noisy errors it becomes a false-green machine — a `500` whose body happens to contain the string you typed is reported successful, and the run's error count drops toward zero. The manual also says to put it on the first assertion under a sampler only.
code
xml · 8 lines<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="checkout ok" enabled="true">
<collectionProp name="Asserion.test_strings">
<stringProp name="0">orderId</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">true</boolProp>
<intProp name="Assertion.test_type">2</intProp>
</ResponseAssertion>go deeper
Know that this is a checkbox on the Response Assertion and that it makes JMeter stop treating the response code as a failure. Do not tick it to make a report look better.
Explain that evaluateResponse calls setSuccessful(true) before matching, so the sampler's 200 to 399 verdict is discarded and the patterns become the only rule left.
Recognise the smell in a plan review: a broad Contains pattern next to a ticked Ignore Status is a sampler that can no longer report what the service did.
Decide when a team's plans may override the sampler verdict at all, and make the override reviewable by grepping Assertion.assume_success rather than trusting each author.
Ignore Status is the one control in a stock JMeter plan that can turn a red sample green, which makes it worth knowing precisely rather than by reputation. ## What the checkbox does In `ResponseAssertion.evaluateResponse(SampleResult response)` the very first statement is: ```java if (getAssumeSuccess()) { response.setSuccessful(true);// Allow testing of failure codes } ``` Only then does the method fetch the field to check and start matching patterns. The component reference says the same thing in words: *"When the Ignore Status checkbox is selected, the Response status is forced to successful before evaluating the Assertion."* Three facts follow: - The sampler's `200–399` verdict is **discarded**, not combined with anything. - Whatever the assertion decides afterwards is the whole verdict, through the usual `result.setSuccessful(result.isSuccessful() && !failed)` in `JMeterThread.processAssertion`. - Because the forced success is written onto the shared `SampleResult`, the manual warns to use the box on the first assertion under a sampler only. It is a property of the **Response Assertion** specifically. The Duration Assertion, Size Assertion, JSON Assertion and the rest have no equivalent; `Assertion.assume_success` appears nowhere else in the source. ## The legitimate use Ignore Status exists so that a plan can load-test an error path on purpose. If you want a sampler that hits an endpoint with a deliberately invalid payload and asserts that the service answers `400` with a machine-readable problem document, the status rule is in your way — it would mark every such sample failed. Tick Ignore Status, set *Field to Test* to `Response Code`, and match `400`. Now the sample fails when the service returns anything except the error you asked for, which is exactly the oracle you wanted. ## How it becomes a false green The misuse is almost always the same story, and it is how a run ends up **reporting zero errors while serving error pages**. A plan is noisy: a share of samplers return `401` because a token expires mid-run, and the report is full of red. Someone ticks Ignore Status to make the report readable, intending to come back to it. From that moment: 1. Every `401`, `500` and `503` on that sampler is forced to success before any pattern runs. 2. The assertion's pattern is usually something broad — a page title, a `<html` tag, a word that appears in the error template too — so it matches the error body as happily as the real one. 3. The run's error count falls to zero, and the response times now describe how fast the service returns errors. The setting has not hidden the errors from a listener; it has genuinely changed the verdict recorded in the results file, so nothing downstream can recover it. ## Reviewing for it Because the checkbox is a plain property in the plan file, it is greppable. A `.jmx` carrying it looks like this: - element `<ResponseAssertion ...>` - a `<boolProp name="Assertion.assume_success">true</boolProp>` line - an `<intProp name="Assertion.test_type">` value naming the matching rule - the patterns inside `<collectionProp name="Asserion.test_strings">` — the misspelling is JMeter's own and is stable So a review can ask a simple question of every plan in a repository: which samplers set `Assertion.assume_success` to `true`, and is each one deliberately testing a failure path? Any that are not are places where the plan has stopped reporting what the service did. ## The pattern still has to be strict Even where Ignore Status is correct, it shifts the entire burden onto the pattern list. `Contains` with a short, common string is not enough once the status is out of play — pick a string that only the intended reply carries, or assert on `Response Code` directly. The rule of thumb is that after ticking the box you should be able to describe, in one sentence, the exact reply that passes; if you cannot, the assertion is not carrying the weight the status rule used to.
- When is Ignore Status the right setting rather than a mistake?When the sampler is meant to exercise a failure path — a deliberate 400, 401 or 500 — and you want your own pattern rather than the status range to decide. Pair it with a pattern strict enough that only the expected error reply passes, or set Field to Test to Response Code and pin the code.
- How would you find every place a repository of JMeter plans overrides the sampler's own verdict?Grep the `.jmx` files for `Assertion.assume_success` set to `true`. It is written as a plain boolProp under the ResponseAssertion element, so a text search finds every occurrence without opening the GUI, and each hit is a sampler whose status verdict the plan has deliberately thrown away.
saying these in an interview costs you the question
- Says Ignore Status skips the assertion entirely
- Thinks it only hides the error from listeners
- Believes it applies to every assertion in the plan
- Uses it to bring a run's error rate down
- Assumes a Duration Assertion offers the same box