Q24 of 38 · CI/CD & DevOps

How do you run post-deployment smoke tests as part of a deployment pipeline?

CI/CD & DevOpsMidci-cdsmoke-testpost-deploydeploymentrollback

Short answer

Short answer: Add a smoke job after the deploy step that hits the live environment's real URLs, verifies critical flows, and reports pass/fail back to the pipeline. A failure triggers automated rollback or an on-call alert.

Detail

Post-deploy smoke differs from pre-deploy tests: it runs against a real running deployment — not a test double — and validates that infrastructure, DNS, TLS, environment variables, and integrations are all wired correctly. No pre-deploy test can catch a missing env var in a production Kubernetes secret.

In practice: add a "smoke" job after the "deploy" job, pass the environment's base URL as an environment variable, and run 10–20 tests that complete in under 3 minutes. Use the same test framework as the rest of your automation.

For production, smoke tests must be non-destructive: read-only API calls, login with a synthetic test account, check critical pages return HTTP 200 and contain expected content. A failing production smoke should trigger automated rollback or a pager alert — not a silent retry.

// WHAT INTERVIEWERS LOOK FOR

Distinction between pre-deploy and post-deploy testing. Knowing tests must hit the real environment. Non-destructive production testing. Connection to rollback on failure.