Software Testing

Beginner path · lesson 26 of 35

BeginnerFundamentals4 min readPublished November 12, 2026

Smoke vs sanity testing

Two quick checks you'll hear about in every team. A smoke test asks 'is this build stable enough to test at all?' A sanity test asks 'does this specific change work well enough to go on?' Here's the difference.

On this page

Key takeaways

  • A smoke test is a broad, shallow check of the main functions of a new build: is it stable enough for further testing?
  • A sanity test is a narrow check of a specific area after a small change or fix: does it work well enough to continue?
  • Both are quick and decide whether to go on. Neither replaces full regression testing.

Why quick checks matter

Imagine spending a morning preparing data and running detailed tests, only to find the login page is broken in this build. Every test fails, and the morning is wasted.

Quick checks at the right moment save that time. They answer one question: is it worth testing further?

Smoke testing

A smoke test touches the most important functions, briefly, to see if the build is fundamentally working.

The name is often said to come from hardware: switch the device on for the first time and check that nothing starts smoking. If it does, there's no point testing anything else.

Typical smoke checks for an online shop:

  • The application starts and the home page loads.
  • A user can log in.
  • Search returns results.
  • A product can be added to the cart.
  • The checkout page opens.

It's wide (many areas) and shallow (one quick check per area). It's often called a build verification test, and it's usually automated and run on every new build.

Sanity testing

A sanity test is narrow and a bit deeper. It focuses on the specific area that just changed.

A developer fixes a bug in discount codes. Before running the full regression suite, a tester quickly checks:

  • The discount code from the bug report now works.
  • A couple of other codes still work.
  • The total and tax look right with a discount applied.

If that fails, there's no point running the long regression suite. The build goes back.

Side by side

Smoke testSanity test
QuestionIs the build stable enough to test?Does this change work well enough to continue?
ScopeBroad: main functionsNarrow: the changed area
DepthShallowA little deeper
WhenOn every new buildAfter a small change or fix
UsuallyAutomated, scriptedOften manual, quick
If it failsReject the buildSend the change back

Where they fit with regression

  1. A new build arrives. Smoke test: is it basically working?
  2. If it passes, focus on what changed. Sanity test (or retest the fix).
  3. If that passes, run the wider regression suite and the rest of the planned testing.

Each step is a gate. Cheap, quick checks come first, so expensive testing isn't wasted on a broken build.

Real-world exampleTen minutes that saved a day

A team received a new build every morning. Testers started their detailed test sessions straight away.

One morning, three testers spent two hours on failures in checkout, search and account settings, before discovering the real cause: the build had been deployed with the wrong database configuration. Nothing could have worked.

The team added an automated smoke test of eight checks, run right after each deployment. If any failed, the build was marked as not ready, and testers were notified. The next configuration mistake was caught in ten minutes, before anyone started testing.

Lesson: a short smoke test is cheap insurance against wasting everyone's time on a broken build.

Do

Keep the smoke suite small and fast, a few minutes at most, and limited to what would make further testing pointless if broken.

Don't

Let the smoke suite grow into a slow, mini-regression suite. Once it takes an hour, it stops doing its job.

Check yourself

A hotfix changes how shipping costs are calculated. Before the full regression run, you spend 10 minutes checking shipping costs for a few orders. Is that smoke or sanity testing?

Show answer

Sanity testing: a quick, narrow check focused on the area that changed, to decide whether it's worth running the full regression suite. A smoke test would instead check the main functions of the whole application briefly.