> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Smoke testing

> Run a small set of your most critical flows as a gate on every deploy.

A smoke test is a small, fast test suite covering your most critical flows:
sign-in, checkout, the main action your product provides. Reach for it as a gate
around a deploy when running your full regression tests on every release is too
slow. It answers whether the build is fundamentally working, not whether every
feature is correct.

Run the smoke tests against the deployment you just shipped:

```bash theme={null}
# Run the tests under tests/smoke against the deployed URL
npx momentic run tests/smoke --url-override "$DEPLOY_URL" --upload-results
```

## When to use it

* You deploy often and want a fast check that each release is healthy before it
  takes traffic.
* Your full regression run takes long enough that you need a faster gate in
  front of it.
* You want one signal that covers the real stack end to end, not isolated unit
  checks.

If your full regression run is already fast enough to gate every deploy, you may
not need a separate smoke layer. Smoke testing earns its place when the full run
is too slow to block on.

## What counts as a smoke flow

Keep the set to a handful so it stays fast and never becomes a second regression
test suite.

* Flows whose failure is a serious incident: login, checkout, the primary create
  or submit action.
* One happy path per flow. Leave edge cases and variants to the
  [regression tests](/guides/use-cases/regression-testing).
* End-to-end paths over isolated checks, so a single test runs against the real
  stack.

## Where it runs in your pipeline

* As a post-deploy check, run it against staging or production with
  `--url-override` set to the deployed URL, and hold or roll back the release if
  it fails.
* As a pre-deploy gate, run it against a preview or staging environment before
  promoting the build.
* For flows whose exact steps vary by environment or feature flag, use an
  [agentic step](/core-concepts/agentic-testing) with a clear goal and a
  post-condition assertion instead of hard-coding each click.

## Get started

<Steps>
  <Step title="Pick your critical flows">
    List the few paths that must work for the product to be usable, and write
    one test per flow.
  </Step>

  <Step title="Run them as a deploy gate">
    Run the smoke tests in CI after a deploy. See [GitHub
    Actions](/running-tests/ci/github-actions) or [custom
    setups](/running-tests/ci/custom-setups) for your provider.
  </Step>

  <Step title="Act on the result">
    Read the trace for any failure in [results](/running-tests/results), and
    roll back or hold the release if the smoke tests fail.
  </Step>
</Steps>

## Keeping it fast

* Budget a few minutes. If the smoke tests grow past that, move the slower flows
  into the [regression tests](/guides/use-cases/regression-testing).
* Select the subset with a path (`momentic run tests/smoke`), `--labels`, or
  `--include`/`--exclude` regex. The `include`/`exclude` globs in
  `momentic.config.yaml` control discovery, not a single run.
* Run it against the deployed URL so it checks what shipped, not your local
  build.

## Related

<CardGroup cols={2}>
  <Card title="Regression testing" icon="shield" href="/guides/use-cases/regression-testing">
    Catch a broader set of regressions on every change.
  </Card>

  <Card title="Agentic testing" icon="robot" href="/core-concepts/agentic-testing">
    Cover flows whose exact steps vary with a goal-driven step.
  </Card>

  <Card title="Run in CI/CD" icon="play" href="/running-tests/ci/github-actions">
    Run the smoke tests after every deploy.
  </Card>

  <Card title="Results" icon="list-check" href="/running-tests/results">
    Read traces and screenshots for any failure.
  </Card>
</CardGroup>
