-
Deployment
Write smoke tests you run against production after every deploy
Automated checks of the critical user flows against a live environment, so bad deploys get caught in minutes.
Free Prompt
Write a small production smoke test suite that runs against a live environment after every deploy. Not a full test suite; a handful of tests that answer 'is the app basically working right now'.
Build it as follows:
1. Pick a tool that does real HTTP or browser interaction: Playwright, Cypress, or a simple k6/curl script depending on what I already use. The tests must hit the deployed URL (staging first, then production) exactly like a user would.
2. Cover the critical flows only:
- Homepage loads and shows expected content.
- Sign-in works with a canary account (stored securely in the CI secret store).
- The main authenticated action succeeds (create the primary object, submit the primary form).
- Checkout works against Stripe test mode (or the equivalent) if payments matter.
- A representative API endpoint returns 200 with the right shape.
3. Use a canary account, not a real user's account. Its data resets are documented and its email address is one you control.
4. Run automatically at two points: (a) after a staging deploy, blocking production promotion if it fails; (b) after a production deploy, alerting me if it fails so I can roll back.
5. Keep them fast. The whole suite should finish in a couple minutes. If a test flakes, fix it or delete it; nobody trusts a flaky smoke test.
6. Also run them on a low-frequency schedule (every 15-30 minutes) against production so you catch drift and outages that didn't come from a deploy.
Don't try to test everything; that's what your unit/integration tests are for. The deliverable is the smoke test file(s) checked in, running post-deploy and on schedule, with alerts wired to a channel I actually watch, and one intentional failure verified to confirm the alert fires.
What This Does / How This Helps
This puts a small suite of real user-flow tests against staging and production, running after every deploy and on a schedule, so bad deploys and drift get caught in minutes instead of by a support ticket. Smoke tests catch the class of bug your unit tests can't: a missing env var in production, a bad migration, a third-party integration that went down, a CDN misconfiguration that broke assets. Ten minutes of writing them buys you the earliest possible warning that something is wrong, which is exactly when it's cheapest to fix.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).