Smoke vs sanity testing
Updated 2026-11-12 · 2 min read
Smoke testing is a broad, shallow check of a new build to decide whether testing can start. Sanity testing is a narrow, deeper check after a small change or fix. Table, examples and the answer interviewers expect.
The terms are used loosely and some teams swap them. Interviewers want the common definitions below, so give those and add "though teams use the words differently, so I always confirm what a team means".
The difference in one table
| Smoke testing | Sanity testing | |
|---|---|---|
| Purpose | Is this build stable enough to test at all? | Does this specific change or fix work? |
| Scope | Broad and shallow: the main features | Narrow and deeper: one area |
| When | On every new build, before detailed testing | After a bug fix or small change, before wider regression |
| Scripted? | Usually scripted, often automated | Often unscripted and quick |
| If it fails | Reject the build; testing stops | Reject the change; send it back to the developer |
| Who does it | Testers, or the pipeline | Testers |
Example
A new build of a shopping app arrives.
Smoke test (10 minutes): the app installs and opens, the user can log in, the home page loads, search returns results, an item can be added to the cart, the checkout page opens. If login fails, there is no point testing anything else, so the build goes back.
Later, a developer fixes a bug where a coupon code did not reduce the total.
Sanity test (15 minutes): apply a valid coupon and check the total, apply an expired one, remove the coupon and check the total returns, and check that the order summary matches. Only then does it make sense to run the full regression for the cart.
How to answer in an interview
"Smoke testing is a quick check on a new build to decide whether it is stable enough for detailed testing: login, main pages, the core flow. Sanity testing is a focused check after a fix or small change to confirm that area works. Smoke is broad and shallow, sanity is narrow and deeper." Then the shopping app example above.
Likely follow-up: Where do they sit relative to regression testing? Smoke comes first on a new build. After a fix you run sanity on the changed area, then regression to check that nothing else broke.
Quick answers
Is sanity testing a subset of regression testing?
Many texts describe it that way: sanity testing is a quick check of one area after a change, and regression testing is the wider check that old behaviour still works. The terms are used loosely between teams, so define them in your answer.
Can smoke testing be automated?
Yes, and it usually should be. A small automated smoke suite runs on every build in the pipeline and stops a bad build early.
Want a project you can show in interviews?
The portfolio project kit walks you through testing a deliberately buggy app with Selenium or Playwright and API tests, then explaining it. The app itself is free.
