DEV Community

Cover image for A Practical Guide to Smoke Testing: Scenarios, Metrics, and Common Mistakes
Clyde Garret
Clyde Garret

Posted on

A Practical Guide to Smoke Testing: Scenarios, Metrics, and Common Mistakes

There’s a lot of confusion in the testing community regarding what smoke testing is, and whether it is really all that different from sanity testing and regression testing.

Having a mental image helps clear that confusion. The name “smoke testing” can be traced back to hardware engineering, where powering on a new circuit board was considered successful if no "magic smoke" escaped from it. Many also point to plumbing, where smoke was pumped through newly installed pipes to detect leaks before water was introduced in them.

Therefore, smoke testing is the first checkpoint after a new build is deployed. I’ll cover the practical aspects of smoke testing, including example use cases and key metrics, in this guide.

What Is Smoke Testing?

Smoke testing is a quick set of tests executed immediately after deploying a new build to verify that the application is stable enough for further testing. Rather than validating every feature, it checks the application's critical workflows, core integrations, and environment health.

A smoke test answers one question: can the QA team confidently proceed with deeper testing, or should the build be rejected?

Objectives of Smoke Testing

A good smoke test is designed to achieve four objectives:

  • Validate build stability: Confirm that the application is functional after deployment.
  • Catch critical failures early: Detect issues such as deployment errors, broken dependencies, configuration problems, or unavailable services before extensive testing begins.
  • Save testing effort: Prevent QA teams from wasting hours testing a broken build.
  • Provide rapid feedback: Give developers immediate visibility into release-blocking issues so fixes can begin without delay.

Think of smoke testing as an early quality gate. Passing a smoke test doesn't mean the application is bug-free; it simply means the build is healthy enough for comprehensive functional, integration, and regression testing.

Smoke Testing vs. Sanity Testing vs. Regression Testing

While these terms are sometimes conflated, they serve different purposes.

Smoke Testing Sanity Testing Regression Testing
Verifies the overall build is stable right after deployment. Verifies that a specific bug fix or newly implemented feature behaves as expected. Verifies that recent changes haven't broken existing functionality.
Broad but shallow coverage. Narrow but deeper validation. Broad and comprehensive coverage.
Runs immediately after every build deployment. Runs after targeted code changes or bug fixes. Runs before releases or whenever significant code changes occur.
Goal: Decide whether testing should continue. Goal: Verify the intended change works. Goal: Ensure existing features continue to work correctly.

A typical workflow looks like this:

Code changes → Build & Deploy → Smoke Test → (Pass) → Sanity Test (if validating specific fixes) → Full Functional & Regression Testing → Release

Suppose a new build of an e-commerce application is deployed.

  • A smoke test verifies that users can open the site, log in, search for products, add an item to the cart, and reach the checkout page.
  • A sanity test verifies that a recently fixed coupon calculation bug now applies the correct discount.
  • A regression test checks the entire purchasing workflow along with user accounts, payments, inventory, order history, notifications, and other related functionality to ensure nothing else has been affected.

The Smoke Test Scenarios I Prioritize

Your smoke suite should contain only the workflows that determine whether the application is fundamentally usable. For a web application, these are the checks I prioritize:

  • Application availability: Verify the application launches successfully after deployment.
  • Authentication: Log in with a valid user account.
  • Navigation: Open key pages and ensure they load without errors.
  • Search: Perform a basic search and verify relevant results are returned.
  • Core business flow: Complete the application's primary user journey, such as placing an order, submitting a form, or booking an appointment.
  • Critical APIs: Verify essential APIs return successful responses.
  • Database connectivity: Confirm critical data can be retrieved and saved.
  • Third-party integrations (if applicable): Ensure services such as payment gateways, authentication providers, or email services are reachable.
  • Error monitoring: Verify no critical exceptions, crashes, or HTTP 5xx errors occur during execution.

Avoid adding edge cases, negative scenarios, boundary testing, UI polish checks, or exhaustive validations to your smoke suite.

Smoke Testing Best Practices

A smoke test should be fast, reliable, and focused on answering one question: Is this build stable enough for further testing? Follow these best practices:

  • Automate the suite: Integrate smoke tests into your CI/CD pipeline so they run automatically after every deployment.
  • Keep execution under 15 minutes: A smoke suite should provide rapid feedback. If it takes an hour to run, it’s probably bloated and needs to be assessed.
  • Focus on critical workflows: Validate only the application's core user journeys and essential infrastructure.
  • Define clear pass/fail criteria: Every smoke test should have a binary outcome. If a critical workflow fails, reject the build and stop further testing.
  • Run in a production-like environment: Test against realistic infrastructure and configurations to catch deployment and environment issues early.
  • Use stable test data: Keep test accounts and datasets consistent to avoid false failures.
  • Maintain the suite regularly: As the application evolves, add newly critical workflows and remove obsolete ones to keep the suite lean and relevant.

How to Select Smoke Test Scenarios

A useful rule of thumb is this: if the failure of a scenario would cause you to reject the build, it belongs in your smoke test suite.

There's no universal smoke test suite. The right scenarios depend on your application's purpose, architecture, and the workflows users rely on most. Whether you're executing tests manually or building an automated suite, use the same selection criteria.

  1. Identify the critical user journeys. List the core workflows without which the application isn't usable. For example: E-commerce: Login → Search product → Add to cart → Checkout. Social media: Login → View feed → Create a post → Logout. Banking: Login → View account balance → Transfer funds.

  2. Include critical dependencies. If your application depends on APIs, databases, authentication services, payment gateways, or other third-party integrations, include a basic check to ensure they're functioning.

  3. Prioritize high-impact features. If you're still unsure, utilize product analytics tools and historical bug reports to see which features generate the highest traffic, and those that would immediately block users if they failed.

Common Smoke Testing Mistakes (With Examples and Fixes)

While smoke testing seems straightforward, teams fall into a few common traps. Here are the four missteps I see most often:

Mistake #1: Turning Smoke Tests into Regression Tests

The biggest mistake is trying to validate everything. For example, a QA team adds 80 checkout scenarios to the smoke suite, including invalid coupon codes, expired cards, tax calculations, and shipping combinations.

Result: The suite takes over two hours to complete. Developers wait longer for feedback, and smoke testing no longer serves as an early quality gate. Besides, the chances of test flakiness due to timeouts can go up.

Fix: Keep only the critical happy path:

User logs in → Searches for a product → Adds it to the cart → Completes checkout.

Mistake #2: Running Smoke Tests in an Unstable Environment

Sometimes the application is fine, but there are issues with the environment. For instance, a banking application might be deployed to staging without the database schema being updated. This will lead to the smoke test failing while loading account balances. A simple environment health check before executing smoke tests will eliminate many false failures.

Result: QA rejects a perfectly good build and developers spend hours debugging an environment issue instead of an application defect.

Fix: Before running smoke tests, validate that:

  • The correct build is deployed.
  • Required services are running.
  • Database migrations have completed.
  • Third-party dependencies are available.
  • Test data is in a known state.

Mistake #3: Writing Brittle Automation

A smoke suite should be resilient to cosmetic UI changes while still detecting functional failures. Let’s look at an example: a login test locates a button using a CSS class. This is the automation code:

await page.locator('.btn-primary-blue').click();
Enter fullscreen mode Exit fullscreen mode

Then the frontend team changes the styling, and the class name changes. In such a case, the smoke suite will fail even though login still works.

Fix: Always use stable locators designed for automation.

await page.getByRole('button', { name: 'Sign in' }).click();
// or
await page.getByTestId('login-button').click();
Enter fullscreen mode Exit fullscreen mode

Mistake #4: Ignoring "Flaky" Smoke Test Failures

A smoke suite is only valuable if the team trusts its results. If flaky tests are routinely ignored, it stops being an effective release gate.

Let’s take an instance where an automated smoke test fails during user registration, but a manual retry succeeds, leading the engineer to override the failure and approve the build anyway. Later, regression testing reveals the registration service fails roughly 30% of the time due to an intermittent backend issue.

Result: The team spends hours testing a build that should have been rejected immediately.

Fix: Don't dismiss smoke test failures without investigation.

  • Capture screenshots, logs, and API responses.
  • Retry only if your pipeline has a defined retry policy.
  • If failures continue, treat the build as unstable until the root cause is understood.

Measuring Smoke Testing Effectiveness: Key Metrics

Not every team needs to track every metric. Keep it simple, so that tracking isn’t too much of a hassle. Here are some important metrics QA teams often track:

  • Smoke Test Execution Time: Measures how quickly the team gets deployment feedback. Aim for 5–15 minutes. If execution time keeps increasing, your smoke suite is likely becoming a regression suite.
  • Build Failure Rate: Measures the percentage of builds rejected because smoke tests found critical issues. A persistently high rate often indicates unstable deployments or weak pre-merge validation.
  • False Failure Rate: Tracks failures caused by flaky automation or unstable environments rather than genuine defects. High false positives reduce trust in the smoke suite.
  • Escaped Critical Defects: Counts production issues that should have been caught by smoke testing. Every escaped defect should trigger a review of smoke test coverage.
  • Mean Time to Detect (MTTD): Measures how quickly smoke tests identify a broken deployment after release. Lower detection times reduce developer context switching and accelerate fixes.

Which metrics should you prioritize? They should match your team’s challenges. For example, if you deploy multiple times a day (CI/CD), prioritize Execution Time and MTTD. If your smoke suite frequently fails for non-functional reasons, focus on False Failure Rate to improve automation reliability.

Also, don't track a metric unless someone owns improving it. Every metric should have a clear owner and a defined action when it moves in the wrong direction; otherwise, it becomes another dashboard that nobody uses.

Conclusion

One of the most impactful changes in my team was redefining what belonged in our smoke tests. We stopped treating smoke testing as a mini regression cycle and instead focused on a handful of critical workflows, which led to much better coordination with developers.

As delivery pipelines become faster and AI increasingly assists with generating test cases and maintaining automation, the role of smoke testing will become even more important. AI can help create scripts, identify impacted workflows, and reduce maintenance effort, but it can't decide what is truly business-critical. That remains a testing strategy decision.

Top comments (0)