Skip to main content
PR testing runs your Momentic tests on every pull request, so a change runs against a real browser or emulator before anyone approves it. Reach for it to catch behavior that reading the diff cannot show: a broken flow, a missing state, a regression in code the diff did not touch. Run the tests against the PR’s preview deployment and emit a JUnit report for your CI:

When to use it

  • You review code by reading diffs and want a runtime signal next to them.
  • You want failures attributed to the change that introduced them while the author still has context. Delayed discovery on main loses that context.
  • You want new code to arrive with coverage. Add the tests as part of the pull request.
Per-branch preview deployments make failures easier to attribute. You can still run against a shared staging environment, but a failure is harder to attribute to a single PR.

Where it fits in review

  • Run the tests as a required check on the pull request branch so a failing run blocks the merge, the same way unit tests or linting do.
  • Run against the branch’s preview deployment so you exercise the code in the PR, not production. For protected previews, see Vercel preview auth.
  • A passing run is evidence the change works; a failing run is a reproduction with a trace you can open.

Cover what the PR changed

A static test suite only catches regressions in flows you already test. Connect your coding agent to the MCP server and use the momentic-spec skill to write the smallest set of Momentic tests that cover what the pull request changes:
The agent writes the tests in your working tree, so they land in the same review as the change itself.

Get started

1

Add Momentic to CI

Run the tests in your CI pipeline on pull requests. Store your MOMENTIC_API_KEY as a CI secret. See GitHub Actions, GitLab CI, or custom setups.
2

Point tests at the PR's preview

Set the base URL to the branch’s preview deployment so each run tests the proposed change, not production.
3

Cover new journeys

Use the momentic-spec skill in your coding agent to add tests for the journeys the diff changed.

Keep PR feedback fast and trustworthy

  • Shard large test suites across CI jobs with --shard-count and --shard-index so a PR is not blocked waiting on a serial run.
  • Decide a flake policy up front. Quarantined tests run but do not fail the PR by default; pass --skip-quarantined to skip them, or --ignore-quarantine to make every status count. See quarantine.
  • The base URL set on a test takes precedence over --url-override; leave it unset on tests you want to retarget per environment.

MCP server

Author tests for the journeys a diff changed from your coding agent.

GitHub Actions

Run Momentic on pull requests, with sharding and secrets.

Regression testing

Protect existing flows across every change.

Vercel preview auth

Test against protected preview deployments.