Guide13 min read

Smoke Testing in Software Testing: Definition, Examples, When to Run

Smoke testing explained: what a smoke test is, how it differs from sanity and regression testing, real examples, and how to automate it without code.

Contents
  1. What Is a Smoke Test in Software Testing?
  2. Smoke Test vs Sanity Test vs Regression Test: What Are the Differences?
  3. When to Run a Smoke Test
  4. Smoke Testing Examples on an E-Commerce Site
  5. How to Build a Good Smoke Test Suite
  6. Automated Smoke Testing: With Code or Without Code
  7. FAQ

Smoke testing is a short check of a software's vital functions, run right after a new build or a release. It answers a single question: does the application stand up? The home page loads, login works, a product goes into the cart. If any of these breaks, there is no point going further: the build goes back for a fix.

A smoke test does not replace a full test campaign. It comes before it. It takes a few minutes, covers a handful of critical journeys and gives a binary verdict: carry on or stop.

This guide explains what a smoke test is, how it differs from a sanity test and from regression testing, when to run it, and which journeys to put in it. Every example runs on GoodDeal, a public demo store built for practicing test automation. The last part shows how to replay those journeys after every release, with or without code.

What Is a Smoke Test in Software Testing?

A smoke test is a small set of tests that covers an application's most important functions, to decide whether a build is worth testing in more detail. It is deliberately broad and shallow: it touches everything that matters without going deep into anything. It is also called a build verification test (BVT), a confidence test or a build acceptance test, and the practice is written "smoke test", "smoke testing" or "smoke check" depending on the team.

The Wikipedia article on smoke testing sums up its role: exposing defects serious enough to reject a release candidate. It asks simple questions. Does the program start? Does the interface open? Does the main button do anything? The MDN glossary describes it the same way: functional or unit tests of critical functions, run before deeper testing.

Where Does the Name "Smoke Test" Come From?

The term comes from electronics and plumbing. In Lessons Learned in Software Testing (Kaner, Bach and Pettichord, Wiley, 2002), the authors tell it this way: you plug in a new circuit board, power it on, and if smoke comes out, you switch it off. No need to test further. In plumbing, smoke was pushed through pipes to find leaks before any water ran.

The idea stayed the same in software: a quick check that saves you from wasting time on a broken build. Among QA teams, people say "smoke test", or just "smoke", much more often than "build verification test".

What a Smoke Test Checks, and What It Leaves Out

A smoke test checks that the main functions respond: the application loads, the user signs in, the main action goes through. It does not check edge cases, rare error messages, detailed calculation rules or every browser combination.

That limit is on purpose. A smoke test that takes an hour is no longer a smoke test: nobody will run it after every deployment. The practical rule is to stay under ten to fifteen minutes, ideally under five when it is automated.

A passing smoke test therefore does not prove the build is good. It proves the build is not broken badly enough to make the rest of the tests pointless. It is a gate, not a sign-off.

Smoke Test vs Sanity Test vs Regression Test: What Are the Differences?

A smoke test checks that the whole application stands up, a sanity test checks that one specific change works, and a regression test checks that nothing that used to work has broken. The three often run in that order, but they do not share the same scope or duration. Mixing them up leads to suites that are too long or too thin.

A sanity test is narrow and targeted. After a bug fix on the promo code, you check that the promo code works, and what sits right next to it. You do not tour the whole application again. Some sources, including the Wikipedia article cited above, use the two terms as synonyms; in QA practice, teams tell them apart by scope.

A regression test is broad and deep. It replays every journey and case already validated, to prove that a change has not broken anything elsewhere. It is the full campaign, the one our regression testing guide details. A smoke test is, in a way, its minimal version: the five or ten journeys you cannot afford to see broken.

Criterion Smoke test Sanity test Regression test
Question asked Does the application stand up? Does this specific change work? Does what used to work still work?
Scope Broad but shallow Narrow and targeted Broad and deep
When Right after a build or a deployment After a fix or a small change Before a release, after a major change
Typical duration A few minutes A few minutes to an hour Tens of minutes to several days when manual
Number of cases 5 to 20 critical journeys A few cases around the change The whole validated suite
Prepared in advance Yes, a fixed list Often no, decided case by case Yes, a maintained suite
If it fails The build is rejected, nobody moves on The change goes back for a fix Each regression is analyzed and fixed
Automation Strongly recommended Varies Essential beyond a certain size

In short, these tests complement each other. The smoke test filters out broken builds in minutes, the sanity test confirms a fix, and the regression campaign protects everything else. A team that only has time to automate one usually starts with the smoke test: it is the shortest and the one that runs most often.

When to Run a Smoke Test

Run a smoke test every time a new version reaches an environment: after each build in integration, after each deployment to staging or pre-production, and right after each release to production. The principle is simple: whenever code or configuration changes somewhere, the critical journeys are checked there.

After Every Build

This is the historical use. A team produces a new build, the smoke test runs, and only a build that passes is handed to the testers. The Wikipedia article also notes that, in a DevOps approach, this build verification step is part of continuous integration. Without it, testers lose their morning on a build that does not even start.

After Every Deployment, Production Included

Code that passed in staging can break in production. A missing environment variable, an expired certificate, a misconfigured third-party service, a stale CDN cache: no unit test sees these failures, because they only exist in the real environment. A smoke test run right after the release catches them within minutes, before your customers do.

This is also where the rollback decision is made. If the checkout journey fails five minutes after the deployment, the team knows exactly which version is at fault and can go back to the previous one.

After a Change That Does Not Touch the Code

A dependency update, a server configuration change, a database migration, a new tracking script added by marketing: these changes break journeys as often as code does. Our article on CSS that broke after a deployment gives several examples. A smoke test replayed after each of them costs a few minutes.

On Which Journeys?

On the journeys whose failure is costly or visible right away: login, sign-up, search, add to cart, checkout, a contact form submission, the most visited page. A good question to sort them: "if this journey breaks tonight, how long before a customer calls us?" If the answer is "an hour", it belongs in the smoke test.

Smoke Testing Examples on an E-Commerce Site

An e-commerce smoke test usually checks six journeys: the store displays, search responds, a product page opens, a product goes into the cart, the order goes through and the customer account signs in. Here are those six journeys on GoodDeal, a demo sports store, public and free, built for practice. Its pages are identical on every visit and nothing in it is real: no order is placed, no payment is charged.

  1. The store displays. Open the home page and check that the product grid contains items. This is the simplest test, and the one that catches the most serious failures: server down, missing JavaScript file, deployment error.
  2. Search responds. Type "hoodie" in the search bar and check that at least one result appears. An empty or failing search drives away a visitor who knew what they wanted.
  3. The product page opens. Open the Delta Tech Fleece tracksuit and check the name, the price and the "Add to Cart" button. On GoodDeal, a size is required before adding: a good checkpoint, because a broken size selector blocks every sale.
  4. The cart receives the product. Pick size M, add to cart, open the cart and check the line and the total. You can add the demo promo code DEMO10 to check that the 10% discount applies.
  5. The order goes through. Fill in the address, pay with the test card 4242 4242 4242 4242 and check that the confirmation page appears. The order number changes with every purchase, on purpose: it is the area to ignore in a comparison.
  6. The customer account signs in. Sign in with the demo account demo@gooddeal.test / Demo1234 and check that the account address appears in the header.

Once automated, these six journeys take under two minutes. They do not check filters, a declined card, sign-up or the contact form: those cases belong to the full regression campaign.

A Smoke Test Should Not Only "Work"

A common trap: a smoke test that checks a button exists and is clickable goes green even if that button has become invisible, covered by a banner or pushed off screen. A functional test sees the code, not the page.

For a critical journey, it is better to also check what the customer sees: that the payment page looks like yesterday's, that the order button is readable, that the price has not disappeared. Our checklist before every release lists the visual points that deserve this attention.

How to Build a Good Smoke Test Suite

A good smoke test suite is short, stable, blocking and maintained. It covers the critical journeys and nothing else, gives the same result on every run when nothing has changed, and a single failure stops the release. These four rules matter more than the tool you pick.

Keep It Short

Aim for five to twenty journeys and a total duration of a few minutes. Every new test must be justified by a failure that would be costly. The temptation to add "just one more case" is constant; it turns the smoke test into a mini campaign that nobody runs after every deployment.

Keep It Stable

A smoke test that fails for no reason one time in ten is worse than no smoke test: the team learns to ignore red. The usual causes are well known: test data that changes, random content, animations, waits that are too short, shared accounts modified by another test. Use dedicated data, a test account used for nothing else, and pages that do not change from one visit to the next. That is also why GoodDeal shows no date, no random content and no animation.

Keep It Blocking

A smoke test is only worth something if its failure stops something: handing the build to testers, the release to production, or it triggers a rollback. If it fails and the build ships anyway, it only produces alerts nobody reads. Decide in advance who receives the result and what happens on failure.

Keep It Maintained

The application evolves, and so does the smoke test. When a new journey becomes critical (a new payment method, an offer page that concentrates traffic), it joins the suite. When a journey disappears, it leaves. A quick review after each major change is enough.

Where to Put It in the Delivery Chain

The smoke test goes right after each deployment, in every environment. In a continuous integration pipeline, it becomes a step that follows the deployment and gates the next one. Our guide to regression testing in a CI/CD pipeline details that sequence: smoke test first, full campaign next, release to production if everything passes, then a smoke test again in production.

Automated Smoke Testing: With Code or Without Code

You can automate a smoke test in two ways: by writing it with a test framework such as Playwright, Cypress or Selenium, or by recording the journeys in the browser with a no-code tool, then replaying them after every release. Both give you a smoke test that runs in minutes; they differ in who can write and maintain it.

With Code: A Playwright Example

With Playwright, you mark smoke tests with a tag, then run only those. The Playwright documentation on tags describes the syntax. Here are three of the journeys above, which run as is on GoodDeal:

import { test, expect } from '@playwright/test';

const SHOP = 'https://delta-qa.com/playground/';

test('the shop opens and lists products', { tag: '@smoke' }, async ({ page }) => {
  await page.goto(SHOP);
  await expect(page.locator('#product-grid > *').first()).toBeVisible();
});

test('a product goes into the cart', { tag: '@smoke' }, async ({ page }) => {
  await page.goto(SHOP + 'product?id=tech-fleece-tracksuit');
  await page.getByRole('radio', { name: 'M', exact: true }).check();
  await page.locator('#add-to-cart').click();
  await page.goto(SHOP + 'cart');
  await expect(page.locator('#cart-lines')).toContainText('Delta Tech Fleece Tracksuit');
});

test('the demo account signs in', { tag: '@smoke' }, async ({ page }) => {
  await page.goto(SHOP + 'login');
  await page.locator('#login-email').fill('demo@gooddeal.test');
  await page.locator('#login-password').fill('Demo1234');
  await page.getByRole('button', { name: 'Sign in' }).click();
  await expect(page.getByRole('button', { name: 'Sign out' })).toBeVisible();
});
npx playwright test --grep @smoke

The three tests pass in a few seconds. This approach suits a team that already writes test code. It has a cost: every selector (#add-to-cart, #cart-lines) must be kept up to date when the interface changes, and only people who read TypeScript can add a journey.

Without Code: Record, Replay, Compare

Replaying critical journeys after every release is exactly what Delta-QA does, a tool for no-code automated regression testing. It works in three steps:

  1. Record. You walk through the site in a real browser, like a customer: open the store, pick a size, add to cart, pay. Delta-QA records every step, without a line of code.
  2. Replay. After each release, you run the journey again. A button that was moved or renamed is found again at replay, with no test to rework. If it has disappeared, Delta-QA does not click somewhere else and flags it.
  3. Compare. Each step is compared to its reference, the way a human eye would. The report names the elements that changed: a button that went from blue to green, a margin that moved, a block that vanished. An area that changes on purpose, like an order number, can be ignored.

The smoke test is then no longer limited to "the button exists": it also checks that the page looks like yesterday's. Sign-up journeys replay on their own, with a new email address on every run. The comparison has been validated on 450 published test cases.

Delta-QA is available as SaaS and as an On-Premise version. For teams that want to run these checks from their pipeline, the Vision SDK adds Delta-QA's checks to Playwright tests; it is in early access. You can practice on GoodDeal before moving to your own site.

FAQ

What is the difference between a smoke test and a regression test?

A smoke test checks in a few minutes that the vital functions respond after a build or a deployment. A regression test replays the whole validated suite to prove that a change has not broken anything elsewhere. The first decides whether you carry on; the second protects the whole application.

What is the difference between a smoke test and a sanity test?

A smoke test is broad and shallow: it touches every critical function. A sanity test is narrow: it checks that one specific change, often a fix, works. Some sources use the two words as synonyms, but QA teams usually tell them apart by scope.

Should a smoke test be automated?

It is not mandatory, but it is strongly recommended. A smoke test runs after every build and every deployment: at that pace, the manual version ends up being skipped. Automated, it runs in a few minutes and gives the same verdict on every run, whether you write code or record the journeys in a no-code tool.

How long should a smoke test take?

A few minutes. The practical rule is to stay under ten to fifteen minutes, and under five when it is automated. Beyond that, it will no longer be run after every deployment, and it loses its point: quickly filtering out a broken build.

What should a smoke test include?

The journeys whose failure is costly or visible right away: home page, login, search, add to cart, checkout, the main form. Five to twenty journeys are enough. Edge cases, rare errors and browser combinations go in the regression campaign.

Should you run a smoke test in production?

Yes, right after every release. Some failures only exist in production: configuration, certificate, third-party service, cache. Use test data and journeys that create nothing real, or a demo environment, so the smoke test does not place real orders.

Try Delta-QA