Skip to content
← All posts

By Specita

Smoke testing in production: what to check after deploy

Smoke testing in production after a deployment: what to cover, how long it should take, an example with a version check, and what to do when it fails.

A paper box with a small clay chimney giving off a curl of paper smoke, beside a terracotta clay token.

Smoke testing in production is a short check, run right after a deployment, that the release is running and its most important paths still work. It confirms the right version is serving traffic, then exercises a handful of critical flows such as sign-in and the main action. It should finish in minutes, and it answers one question: is this release broken enough to stop or roll back right now?

It's narrower than a regression suite. A smoke test tells you nothing about most of your features. It's there to catch the failures that a green pipeline misses: a bad environment variable, a failed migration, a missing secret.

What smoke testing in production should cover

Pick the few things that, if broken, would make you roll back at once.

CheckWhy
The expected version is liveProves the deploy reached this environment
Health endpoint respondsThe app started
Database or key dependency is reachableThe usual place for a config error
Sign-in worksAlmost everything else depends on it
Main user action worksThe reason people use your product
One background job runsWorkers can fail with no visible error

Leave everything else to your other tests. A smoke test with 200 steps gets slow and flaky, and people start ignoring it.

Check the version first

A passing smoke test against the old version proves nothing. Expose the running version from an endpoint, then check it.

EXPECTED="$GITHUB_SHA"
ACTUAL=$(curl -fsS https://app.example.com/version | jq -r .commit)

if [ "$ACTUAL" != "$EXPECTED" ]; then
  echo "Expected $EXPECTED but $ACTUAL is serving" >&2
  exit 1
fi

With rolling deployments, some instances may still be on the old version. Retry for a short window before you fail, so that you don't raise a false alarm during the rollout.

A small automated example

Here's a smoke test using Playwright, which covers sign-in and one action. Replace the URLs and selectors with your own.

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

test('sign in and open dashboard', async ({ page }) => {
  await page.goto(process.env.BASE_URL + '/signin');
  await page.getByLabel('Email').fill(process.env.SMOKE_EMAIL!);
  await page.getByLabel('Password').fill(process.env.SMOKE_PASSWORD!);
  await page.getByRole('button', { name: 'Sign in' }).click();
  await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
});

Use a dedicated test account in production, with no real customer data and the least access that it needs. Mark its activity so it doesn't skew your analytics. Store the credentials in CI secrets. If the flow creates data, clean it up, or use a test tenant.

Think before you automate anything that charges money or sends messages to real people. Use a provider's test mode where it exists, or check the step just before the payment.

Where to run it

Run it straight after the deploy, as a pipeline step that can fail the release:

deploy:
  steps:
    - run: ./deploy.sh
    - run: ./scripts/check-version.sh
    - run: npx playwright test smoke/

Run it from outside your network if you can. A test from inside your cluster won't notice a broken load balancer or DNS record.

Run it on a schedule too. A check every few minutes in production catches things that break without a deploy, such as an expired certificate or a provider outage. That's closer to synthetic monitoring, and you can reuse the same script.

How long should it take?

Under five minutes is a good target. Your team waits on this result before it can relax. If yours has grown past that, move the slower checks into a later stage that doesn't block.

Keep it reliable. A smoke test that fails at random trains people to re-run it without reading it. Fix flaky checks or delete them. A check that nobody believes is worse than having none, because it costs time and gives no confidence.

What to do when it fails

Agree on this before you need it.

  1. Check whether it's the test or the product. Open the failing flow yourself.
  2. If the product is broken, roll back first and investigate second. For a web app, this is usually the fastest fix.
  3. Tell the release channel what you saw and what you did.
  4. Find the cause, using a comparison of the two tags.
  5. Add a check if the failure is one your smoke test should have caught.

A migration can complicate a rollback, because the old code may not run against the new schema. Keep migrations backward compatible, so that rolling back stays an option. See our hotfix process for when a rollback won't work.

Smoke testing mobile apps

Mobile has a problem that web doesn't: you can't test after users have the release in quite the same way, since store delivery happens on Apple's or Google's schedule. Your smoke test moves earlier and later.

Before rollout, install the exact build from TestFlight or an internal track on a real device, and run through the main flows. After release, install from the store on a clean device and confirm that the version number is right and sign-in works. Then let a phased release or staged rollout take on the rest of the risk, with post-release monitoring on top.

Backend deploys can break older app versions, so include an API check using the oldest version you still support.

Report the result

Save the result with the release. "Smoke test passed at 14:03 against commit abc123" is a useful fact. It's more useful than a green check in a CI run nobody will find next month.

Specita's deployment reporting lets your pipeline report a delivery from CI as a signed event, so the version, environment, and result sit in the release record. A release counts as delivered based on that report. Quality signals stay separate. For a broader list, read the post-deployment checklist.

Written on November 4, 2026.