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
mainloses that context. - You want new code to arrive with coverage. Add the tests as part of the pull request.
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 themomentic-spec skill to
write the smallest set of Momentic tests that cover what the pull request
changes:
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-countand--shard-indexso 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-quarantinedto skip them, or--ignore-quarantineto 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.
Related
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.