How many error scenarios should you test before a release?
No magic number: a practical baseline for negative testing before release, from one negative test per requirement to every failure path of critical flows.
There is no universal number. Cover at least one negative test per requirement and one test for every way each critical flow can fail (bad input, a dependency that is down, a timeout, a refused permission). Rank the rest by impact and likelihood, test from the top, and record what you skip as accepted risk.
The short answer
There is no universal number of error scenarios to cover before a release. A sound baseline is at least one negative test per requirement, plus one test for every way each critical flow can fail (bad input, a dependency that is down, a timeout, a permission it should refuse). Then rank the rest by how likely and how costly each failure is, and test from the top until the time runs out. Whatever you skip, write down as accepted risk.
A count is the wrong goal. What matters is that every critical flow has its failure paths tested and that nobody is surprised by what was left out.
Error scenarios worth covering
Most bugs that reach users fall into a handful of categories. Walk each critical flow through this table and note which rows apply.
| Category | What to try | Example |
|---|---|---|
| Invalid input | Empty, too long, wrong format, wrong type | A card number with letters in it |
| Boundaries | The edges of every limit | Transfer exactly the daily limit, then one cent more |
| Permissions | A user who should be refused | A viewer opening the admin page by its URL |
| Authentication | Expired, missing or reused credentials | Submitting a form after the session timed out |
| Dependencies | A service that is slow, down or returns an error | The payment provider answers with a 503 |
| Network | Timeouts, dropped connections, retries | Losing signal halfway through an upload |
| Concurrency | Two actions on the same thing at once | Two people approving the same request |
| Interrupted actions | Closing, going back or refreshing mid-way | Pressing Back after paying |
| Data | Missing, duplicate or legacy records | An account created before a field became required |
| Recovery | What the user sees after any of the above | A clear message, nothing charged twice, a way to retry |
A worked example: checkout
Take a checkout flow with four steps: cart, address, payment, confirmation. The happy path is one test. Error scenarios, by category:
- Invalid input: bad postcode, expired card, card declined. 3 tests.
- Boundaries: cart at the maximum item count; order total at the free-shipping threshold. 2 tests.
- Dependencies: payment provider times out; address lookup is down. 2 tests.
- Interrupted actions: user presses Back after paying; refreshes the confirmation page. 2 tests.
- Concurrency: item sells out while it sits in the cart. 1 test.
- Recovery: after a failed payment, the user can retry without re-entering the address and is not charged twice. 1 test.
That is 11 error scenarios against one happy path, which is typical: critical flows usually need several negative tests for each positive one. A low-risk settings page might need two.
How to decide what to cover first
When you cannot test everything, rank each scenario by two questions:
- Impact: how bad would it be if this failed in production? Money, data loss and security come first.
- Likelihood: has this area changed recently, failed before, or never been tested?
Test the scenarios that score high on both first. This is the core of risk-based testing, and it keeps the most important information arriving earliest in a short test window.
A minimum before every release
Before you call a release ready, check that:
- Every critical flow has its main failure paths tested, not only the happy path.
- Every change in this release has at least one negative test around it.
- Bugs fixed in this release have a test that reproduces the original failure.
- Permissions are tested for each new screen or endpoint.
- Anything you chose not to test is written down as accepted risk and agreed by the release owner.
Then bring the results to the go/no-go decision. The release readiness checklist covers the checks to agree in advance, and the free go/no-go checklist template gives you a page to record the decision.
Where TestPlum fits
TestPlum keeps negative and positive tests side by side in one place, links them to the requirements they prove, and shows for each release which tests have run, which failed and what is still untested, so the decision is made on evidence rather than a feeling. See the release verdict.
Frequently asked questions
What is an error scenario in testing?
A test of what happens when something goes wrong: invalid input, a limit exceeded, a refused permission, a dependency that is down, a timeout or an interrupted action. It is also called a negative test.
How many negative tests should each feature have?
At least one per requirement, and more for critical flows. A payment or sign-in flow often needs several negative tests for each positive one; a low-risk settings page may need two.
Should every error scenario be automated?
Automate the ones that run every release and are stable to script, such as validation and permission checks. Keep exploratory sessions for unusual failures that are hard to predict.
What if there is no time to test every error scenario?
Rank them by impact and likelihood, test the highest first, and write down what was not tested so the release owner accepts that risk knowingly.