MatrixBeginner3-5 min reference
Smoke vs Sanity vs Regression
Three words that get used interchangeably and mean very different things. This is a quick reminder of what each scope actually verifies, when to reach for it, and roughly how much it costs you. It is a decision aid, not a full strategy — link out below for the deeper regression strategy and release process.
At a glance
| Smoke | Sanity | Regression | |
|---|---|---|---|
| Question it answers | "Is the build stable enough to test?" | "Did this specific change work?" | "Did anything else break?" |
| Scope | Broad & shallow — critical paths only | Narrow & deep — the changed area | Broad & deep — the whole product |
| Depth | One happy path per critical feature | Edge cases for the new/fixed feature | Full suite incl. previously fixed bugs |
| When | Every build / deploy, before anything else | After a hotfix or small change | Before a release; nightly in CI |
| Typical duration | Seconds–minutes | Minutes | Minutes–hours |
| Usually | Automated, runs first in the pipeline | Often manual/exploratory, time-boxed | Automated suite |
| If it fails | Reject the build — don't test further | The fix isn't done | Triage; may block release |
When to use which
- Hotfix to prod → Sanity-check the fixed flow, then a smoke run on the deploy. A full regression rarely fits the timeline.
- New sprint build → Smoke first (gate), then targeted testing of the sprint's stories.
- Release candidate → Full regression, with the smoke suite as the entry gate.
Common mistakes
- Calling a long, deep pass a "smoke test" — if it takes an hour, it's regression.
- Skipping smoke and burning a tester's afternoon on a build that was never deployable.
- Treating sanity as a substitute for regression on a risky change.
- No automated smoke gate in CI, so broken builds reach manual testers.
Good example
Smoke (5 min, automated): load app → log in → open dashboard → create one record → log out. Sanity (15 min, manual): the promo-code fix — valid code, expired code, stacked codes, code on an empty cart. Regression (nightly): the full 600-case suite, including the three promo bugs fixed last quarter.
// Related resources