Skip to main content
A Mo session finds a bug once. A regression test in your repository checks the same behavior on every run of the suite you add it to.

Write the test with Mo’s Coder

Mo’s Coder can write a Momentic regression test for a bug it finds and open it as a draft pull request in your repository:
  1. Before starting the session, connect GitHub and select the repository on the Mo workspace page.
  2. Enable the repository’s Regression tests toggle.
  3. In a session with Coder enabled, choose Write regression test on the finding.
A workspace admin can turn on Always start coding agent under Settings > Mo > Behavior to give every new session the Coder. With GitHub connected, the Coder can then open pull requests in any repository selected on the Mo workspace page, not only those with Regression tests on. Without a writable repository, it writes the test files on the session machine and opens no pull request; ask Mo for their paths and copy each with qa download. The Coder writes a test that fails at the bug assertion until the bug is fixed. Review the test, and its draft pull request when there is one, before adding it to your CI suite. The Coder writes Momentic tests, not application fixes.

Write the test with your own coding agent

Give your coding agent the bug’s setup, reproduction steps, expected behavior, and evidence (qa report <session-id> exports them). With the Momentic MCP server and the momentic-test skill for browser, Android, and iOS tests, it writes the .test.yaml file in your repository:
Run it with npx momentic run or npx momentic-mobile run, then add it to the suite your CI runs. See run tests locally.

Without the GitHub integration

Your coding agent can have Mo edit a copy of your tests and bring the changes back as a Git patch. It sends the test files with qa upload, briefs Mo, then fetches Mo’s diff with qa download and applies, lints, and runs it. See move files. momentic-ai/examples#58 is a template for Codex: a script, a prompt, and a manual GitHub Actions workflow that outputs the patch as an artifact. To write, run, and maintain the rest of your suite, see how regression tests work.