Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Testing Methodologies  ›  Lesson

Smoke, Sanity and Regression Testing

Regression Testing 14 minSmoke tests check that a new build is stable enough to test at all, sanity tests check that a specific fix works, and regression tests check that changes have not broken features that used to work.

Smoke, Sanity and Regression Testing

A new Basketly build lands with the SAVE10 fix inside. You could start a full day of testing straight away. But what if the app does not even load? What if the fix does not work? And what if the fix broke something else, like the delivery fee? Three quick questions, three kinds of testing.

The rule

Smoke: does it run? Sanity: does the fix work? Regression: did anything else break?

  • Smoke testing is a short, broad, shallow check that a new build is stable enough to test further. It touches the main journeys: open the app, log in, search, add to cart, reach checkout. If smoke fails, the build goes straight back. The name comes from hardware: switch it on and see if smoke comes out.
  • Sanity testing is a short, narrow check that a specific change or fix does what it should, plus its immediate surroundings. It is a quick "does this make sense?" before investing more time.
  • Regression testing re-checks features that already worked, to catch anything the change broke by accident. Code is connected in surprising ways, so a coupon fix can break a delivery fee. Regression suites grow over time, which is why they are the first thing teams automate.

Some teams use "smoke" and "sanity" loosely or even swap them. What matters is the idea behind each: broad-and-shallow, narrow-and-focused, and wide re-checking.

The shortcut

Run them in cost order: smoke, sanity, regression. Each is a gate that protects the time spent on the next.

Testing the SAVE10 fix buildStep 1 of 4
  1. Smoke (5 minutes)

    App opens, login works, "eggs" search returns eggs, cart and checkout load. Build accepted.

The trap is skipping regression because "it was only a small fix". Small changes in shared code, like the function that calculates totals, cause some of the most surprising breakages.

Drills

Answer fast — trust the rule.

quick drill

A build arrives and you check that login, search and checkout open at all. What is this?

quick drill

After the coupon fix, delivery fees break. What kind of testing should catch this?

quick drill

You check only the fixed coupon rule and its neighbours. What is this?

quick drill

Why run smoke before a long regression suite?

quick drill

Which kind of testing do teams usually automate first?

Remember

  • Smoke: does it run? Sanity: does the fix work? Regression: did anything else break?
  • Run them in cost order; each gate protects the next.
  • No change is too small for regression in shared code.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainAfter the coupon fix

Developers fix the SAVE10 minimum-cart bug and deliver a new Basketly build. Describe the smoke, sanity and regression checks you would run, in order, and explain why the order matters.