StoicBuilder

HandbookX the PortusSmoke tests after a deploy

Xthe Portus, Ship it

Smoke tests after a deploy

1 min readUpdated 28 November

In plain words

A smoke test is a short set of checks run against the live app right after a deploy, such as loading the home page, signing in and reaching the API, to catch a broken release within minutes.

Where you see it

Harbor's deploy finishes and the pipeline runs a handful of checks against production: the health endpoint answers, the login page loads, a test account signs in and its invoices list loads. If any check fails, the pipeline rolls back before most customers notice.

scripts/smoke.shterminal
set -euo pipefailBASE=https://app.harbor.examplecurl -fsS "$BASE/api/health" | grep -q '"db":"ok"'curl -fsS -o /dev/null "$BASE/login"npx playwright test e2e/smoke --project=chromiumecho "smoke tests passed"
curl -f fails on any error status, and set -e stops the script at the first failure, which fails the deploy step.

What goes wrong

  1. A health check that checks nothing

    An /api/health route that always returns 200 stays green while the database is unreachable. Have it touch what the app needs, such as one cheap database query.

  2. Smoke tests that change real data

    A check that creates an invoice or charges a card in production leaves a mess and can email a real customer. Use a dedicated test account and checks that read rather than write.

  3. Running the full suite after every deploy

    Smoke tests have to finish in a minute or two, or nobody waits for them. Keep the long end-to-end suite for before the deploy.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Write a smoke test script that runs against production right after each deploy and finishes in under two minutes: the health endpoint with a real database check, the login page, and a sign-in with a dedicated test account. Keep it read-only, and make the deploy step fail if any check fails.

Quick check

Sign in to earn +10 XP for it

Harbor's /api/health returns 200 with {"ok": true} no matter what. Last night the database was down for an hour and the smoke test stayed green. What's the fix?

Got a prompt that touches smoke tests after a deploy?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.