Smoke testing vs sanity testing

    Smoke testing vs sanity testing explained with examples: what each checks, when to run it, who runs it, and how both relate to regression testing.

    By the Tebugging team6 min read

    Smoke testing is a quick, broad check that a new build works well enough to test at all. Sanity testing is a quick, narrow check that one specific change or fix works. Both are short; the difference is breadth. Smoke testing touches many features lightly, sanity testing looks at one area closely.

    The differences at a glance

    Smoke testingSanity testing
    QuestionIs this build stable enough to test?Does this change or fix work?
    BreadthWide: the most important featuresNarrow: one area
    DepthShallowA bit deeper in that area
    WhenOn every new build, firstAfter a small change or bug fix
    Scripted?Usually a fixed, automated listOften unscripted or a short list
    If it failsThe build is rejected; no further testingThe change goes back to the developer

    Examples

    Take an online shop that just got a new build with a fix for discount codes.

    • Smoke test: the home page loads, a user can sign in, search returns products, an item can be added to the cart and checkout opens. Five minutes, every build.
    • Sanity test: apply a valid discount code, an expired one and an invalid one; check the totals and the error messages. Ten minutes, only because the discount code logic changed.
    • Regression test: afterwards, the full regression suite checks that nothing else broke, from sign-up to order history.

    Smoke vs sanity vs regression testing

    The three often run in this order. Smoke testing decides whether the build is worth testing. Sanity testing confirms the specific change works. Regression testing then checks that the change did not break anything else. Smoke and sanity tests are small enough to run many times a day; a full regression suite usually runs before release.

    SmokeSanityRegression
    CoversCritical features, lightlyOne changed areaEverything that worked before
    TimeMinutesMinutesMinutes to hours
    RunsEvery buildAfter a changeBefore release, or on every merge for critical tests

    Should you automate them?

    • Smoke tests: yes. They are the same every time and run on every build, so automation pays back quickly.
    • Sanity tests: partly. Many are quick manual checks of a fresh change; the useful ones can join the regression suite afterwards.
    • Keep smoke tests few and stable. A flaky smoke test blocks every build. See flaky tests.

    Tebugging runs tests automatically with real-time monitoring, so a smoke run on each new build shows results as they happen. Its AI-powered reporting and analysis summarize the results. Definitions of both terms are in the QA glossary.

    Frequently asked questions

    Is sanity testing a subset of regression testing?+

    It is often described that way: a small, focused part of regression testing around a recent change. In practice it is a quick check run before the wider regression suite.

    Who performs smoke and sanity testing?+

    Smoke tests are usually automated and run by the CI system, or by QA on each new build. Sanity tests are usually done by QA or by the developer who made the change.

    Can a test be both a smoke test and a sanity test?+

    Yes. Checking that sign-in works is part of the smoke test, and it is also the sanity test after a fix to sign-in. What changes is why and when you run it.

    Keep reading

    New to a term? See the QA and AI testing glossary.

    Tebugging

    Plan, run and analyze your web tests with AI.

    Start on the free plan. No credit card required.

    Start Testing Free