---
title: "Smoke test every deploy · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/smoke-test-every-deploy
updated: 2026-10-20
licence: "All rights reserved"
---

# Smoke test every deploy

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [End-to-end and browser tests](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests)
- Rule: Right after each deploy, run a few fast, read-only tests against the live address. Roll back when one fails.
- How: Pick three to five checks that prove the release works for visitors. Load the home page and a key page, sign in with a test account, and search. Never buy, send email or change customer data. Run them from the deploy script after the [health check](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/health-check-and-rollback) passes, with a total time limit such as two minutes. Treat a failure like a failed health check.
- Check: Deploy a release with a broken key page to staging. The smoke tests fail, and the deploy script rolls back and exits with a code other than zero.

Example:

```js
// smoke.spec.js, run with: BASE_URL=https://example.com npx playwright test smoke.spec.js
test('the product page shows a price', async ({ page }) => {
  await page.goto('/products/mug');
  await expect(page.getByText(/€\d/)).toBeVisible();
});
```

```python
# smoke_test.py, run with: BASE_URL=https://example.com pytest smoke_test.py
def test_the_product_page_answers():
    response = httpx.get(f"{os.environ['BASE_URL']}/products/mug", timeout=10)
    assert response.status_code == 200
    assert "Add to cart" in response.text
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers testing playbook: https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/smoke-test-every-deploy`.

- Previous: [Test in more than one browser and size](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests/browsers-and-sizes)
- [End-to-end and browser tests](https://agentwranglers.se/playbook/testing/end-to-end-and-browser-tests)
