Smoke Testing vs Sanity Testing: Differences and Examples
Smoke testing is a quick check that a new build is stable enough to test at all: does it launch, can you log in, do the main screens load? Sanity testing is a narrow check after a small change, to confirm that specific change works as intended. Smoke is wide and shallow. Sanity is narrow and a little deeper. Regression testing checks for unintended effects of a change. Smoke and sanity checks can overlap with regression coverage.
What is smoke testing?
A useful analogy is powering on a new circuit to check for an obvious failure before testing it in detail. In software, a smoke test is the first thing you run on a fresh build. It answers one question: is this build worth anyone’s time?
A smoke test covers the critical path only. It does not look for subtle bugs. It looks for the kind of failure that makes all other testing pointless.
Example. A new build of a mobile banking app lands. Before anyone writes a single detailed test, someone runs through this:
- The app installs and opens without crashing.
- The login screen appears and a test user can sign in.
- The account overview loads.
- A transfer screen opens.
If any of those fail, the build goes back to the developers immediately. Nobody spends an afternoon testing a build that cannot log in.
Smoke tests are short, usually minutes. They are often automated and run on every build, which is a good fit: the checks are stable and the result is a plain go or no-go.
What is sanity testing?
Sanity testing happens after a small, specific change, usually a bug fix or a minor tweak. You already know the build is stable. Now you check that the change did what it was supposed to do, and that the area immediately around it still behaves sensibly.
It is narrow and focused. You do not re-run the whole product. You check the thing that changed.
Example. Customers reported that the discount code field rejects valid codes with a lowercase letter. A developer fixes it. A sanity test would be:
- Enter a valid code in lowercase. It is accepted.
- Enter it in uppercase. Still accepted.
- Enter a truly invalid code. Still rejected.
- Apply the code and confirm the total is correct.
That takes a few minutes and tells you whether the fix is real. It also checks a small part of checkout for regressions, but leaves other checkout behavior untested.
A sanity check can be manual or automated. Checking that a reported defect is fixed is confirmation testing; checking nearby existing behavior is regression testing. ISTQB
What is regression testing?
Regression testing checks that existing features still work after a change. Its scope and duration depend on change impact and risk; it can be a targeted subset or a broad suite. In the discount code example, the regression pass would cover checkout end to end, other coupon types, saved carts and anything else that shares code with the discount logic. We cover how to build and prioritize one in what is regression testing.
Smoke vs sanity vs regression: comparison table
| Smoke testing | Sanity testing | Regression testing | |
|---|---|---|---|
| Question it answers | Is this build stable enough to test? | Does this specific change work? | Did the change break anything else? |
| Scope | Broad coverage of critical functions | Changed area and nearby behavior | Existing behavior selected by impact and risk |
| Depth | Basic checks | Focused checks | Depends on the selected tests |
| When it runs | On every new build, first | After a small fix or tweak, on a stable build | Before a release and after significant changes |
| Duration | Usually short | Usually short | Depends on scope, tooling and environment |
| Usually done by | Automation, or the team that built it | A tester or developer who knows the change | Automation plus manual testers |
| Approach | Repeatable checklist or automation | Focused manual or automated checks | Repeatable tests, with exploration where useful |
| If it fails | Reject the build, stop testing | Send the fix back | Triage, then fix or delay the release |
When to use which
Use these checks according to the change and its risks; they are not three mandatory, separate stages.
- A new build arrives. Run the smoke test. If it fails, stop and send it back.
- The build is stable and contains a fix or small change. Run a sanity test on that change.
- You are close to a release, or a large change landed. Run regression testing.
Skipping a step is where teams get hurt. If you skip the smoke test, testers spend hours on a build that was broken from the start. If you skip the sanity test, you find out a fix did not work only after the full regression pass, which is the slowest and most expensive place to learn it. If you skip regression, you find out from your users.
A few practical rules:
- Tight deadline, small change? Smoke plus sanity can be enough, but say plainly that you did not run a regression pass.
- Big refactor or dependency update? Smoke, then straight to regression. A sanity check alone would leave too much risk uncovered.
- Hotfix at 6 p.m.? Smoke-test the build, confirm the fix and select regression checks by impact and risk. Decide whether to release and when to broaden testing based on the remaining risk.
Where the lines blur
In real teams these terms overlap, and people use them loosely. Some teams call their automated pre-release checks a smoke suite even though it takes forty minutes. Some call any quick manual check a sanity test. Do not argue about the label. Agree on what each level covers and how long it should take, and write it down. A shared definition on your team is worth more than the textbook one.
Where humans matter
Automation fits smoke testing well, because the checks are fixed and the answer is yes or no. But a smoke test only proves the app opens and the main paths respond. It can pass while the layout is broken on one screen size or a button is unreachable on a TV remote. A person who opens the build and uses it for ten minutes catches things a script was never told to look for. That is the idea behind exploratory testing, and it pairs well with all three levels above.
A person helps select checks and investigate unexpected results. Repeatable checks can then be automated.
A simple template you can use
For your next build, write three short lists and keep them in your repo or wiki.
- Smoke list (5 to 10 checks). Install or load, log in, open each main area, perform the one action your product exists for.
- Sanity notes (per change). The change, the expected behavior, two or three things to check around it.
- Regression suite. The fuller list, prioritized, run before each release.
The cost of writing these is an afternoon. The cost of not having them is a release where nobody is sure what was tested.
If your team needs a tester to run these passes on real devices, with working hours that overlap with the US, you can see what we offer in the pricing section.