Software Testing Smoke and Sanity Testing

A new build arrives from the developers on a busy morning. Running hundreds of test cases on a broken build wastes the whole day. Smoke testing and sanity testing give testers a fast way to decide whether a build deserves deeper effort. Both checks are short, and each one answers a different question.

Smoke Testing

Smoke testing checks the most critical functions of a fresh build. The name comes from hardware engineers who powered on a new circuit board and watched for smoke. No smoke meant the board could go forward to detailed testing.

Purpose

A smoke test answers one question: "Is this build stable enough to test further?" A failed smoke test sends the build straight back to the developers.

Characteristics

  • Broad and shallow, touching every major area lightly
  • Executed on every new build
  • Scripted, and often automated
  • Completed within minutes

Example: Online Shopping Website

  1. The home page loads.
  2. A user can log in.
  3. Search returns products.
  4. An item moves into the cart.
  5. The checkout page opens.

All five checks pass, so the team starts detailed testing. One failure rejects the build.

Sanity Testing

Sanity testing checks a narrow area after a small change or bug fix. The tester wants a quick confirmation that the change works and that nearby behavior still makes sense.

Purpose

A sanity test answers the question: "Does the fix work, and did it leave obvious damage nearby?" A pass allows the team to continue with deeper regression testing.

Characteristics

  • Narrow and deep, focused on one feature
  • Executed after minor changes
  • Often unscripted
  • Completed in a short time

Example: Coupon Fix

Developers fix a bug where a 10 percent coupon applied twice. The tester applies the coupon once, confirms the correct discount, checks the order total, and verifies that the tax line still calculates correctly. The tester ignores unrelated features such as the wishlist.

Visual Comparison

  SMOKE TEST (wide and shallow)          SANITY TEST (narrow and deep)

  [Login][Search][Cart][Pay][Profile]    [Coupon]
     |      |      |     |      |           |
     v      v      v     v      v           v
   quick  quick  quick quick  quick     detailed check

Key Differences

PointSmoke TestingSanity Testing
ScopeWhole application, main functionsOne feature or fix
Build typeNew, unstable buildRelatively stable build after changes
DocumentationUsually scriptedUsually unscripted
DecisionAccept or reject the buildAccept or reject the change
Subset ofAcceptance of the buildRegression testing

Place in the Test Cycle

  New Build --> SMOKE TEST --pass--> Detailed Testing --> Bug Fix
                   |                                         |
                  fail                                       v
                   |                                   SANITY TEST --pass--> Regression
                   v
            Return to developers

Best Practices

  • Keep the smoke suite small, ideally under thirty minutes of manual work.
  • Automate smoke checks and run them inside the build pipeline.
  • Review the smoke list each release so it matches current business priorities.
  • Record sanity results in the bug report so developers see the confirmation.

Common Mistakes

  • Growing the smoke suite until it becomes a full regression run
  • Skipping smoke tests under deadline pressure
  • Treating sanity testing as a replacement for regression testing

Smoke and sanity checks protect the team's time. A few minutes of checking prevents hours of confusion about failures that came from a broken build.

Example: Smoke Suite for a Banking App

A banking team keeps a smoke suite of six checks: the app launches, the login works, the balance screen loads, a transfer form opens, the statement list appears, and logout completes. An automated job runs the suite after every build, and the result appears in the team chat within ten minutes. A single red check blocks the build, which saves the testers from investigating errors that come from a broken release.