Summary
Create, run, and maintain end-to-end tests using AI-driven browser automation with YAML serialization.
- Tests are ordered lists of structured steps executed with Playwright and CDP, supporting interactive clicks/types, multimodal assertions, and goal-based AI actions
- Step metadata (selectors, XPaths, coordinates) is cached by git branch to avoid repeated AI calls; cache can be disabled or refreshed per step when targeting dynamic elements
- Tests and reusable modules serialize to disk as
*.test.yamland*.module.yamlfiles (v2 format supports direct YAML editing; v1 requires MCP CLI) - Test context persists across steps via
envvariables; JavaScript steps run in either NODE (with Momentic helpers, database access, OTP/email) or BROWSER (with DOM access) - Smart waiting up to 5 seconds settles page state before targeting; project defaults in
momentic.config.yamlcan be overridden per test for browser type, viewport, auth, proxy, and timeouts
Write Momentic tests
- Identify the target app from
momentic.config.yaml, existing tests and modules, and dependencies.
Formomentic/mobile-testormomentic/mobile-module(including/v2), Android/iOS apps,
or amomentic-mobiledependency, usenpx momentic-mobileand local MCP
servermomentic-mobile. Formomentic/testormomentic/module(including/v2),
browser apps, or amomenticdependency, usenpx momenticand local MCP
servermomentic. In a mixed repo, follow the target test, module, or app; ask if unclear.
Use that product's CLI and local MCP tools, not the other product's.
Read, list, and search product-specific references
only inside itsreferences/products/web/orreferences/products/mobile/
directory. Read shared references when the active skill calls for them, including
run evidence, classification, and manual artifacts.
Exclude the other product's references from broader repository or
installed-skill searches. - Read the web guide when testing a browser
app, or the mobile guide when testing
Android or iOS. Confirm the expected result, environment, and authentication. - Edit known v2 YAML directly and run the selected CLI's
lint.
Reload an active session before validating saved edits.
For v1 changes, unfamiliar screens, or live validation, use MCP as below. - Validate the changed saved steps and their prerequisites, then terminate the session.
Report the result and any steps left unverified. Ask before changing a requested
assertion that the app doesn't satisfy.
Start a session
Create a new test with momentic_test_create, then call momentic_session_start
with its ID. For an existing test, start it directly. Read the returned Step
Authoring Guide and use its active step IDs.
Read Session details for creation inputs, persisted
versus active state, and step references.
Use momentic_get_artifacts to discover tests, environments, and other artifacts.
Use momentic_test_get to read a saved test outside the active session, andmomentic_get_environment_variables when a step needs an unknown value.
Preview, save, and validate
- For a mid-test change, run through the preceding step in the same session.
- Preview with the product guide's tools and inspect the screenshots.
Request state only when the image doesn't show enough to choose a target or explain a failure. - Save successful steps with
momentic_test_splice_steps. Attach each returnedCacheIdto its exact step and use the updated step IDs. - Run the smallest saved range covering the change, including its next dependent
step. Reuse prerequisites already run in this session.
Run one operation at a time per session. If a preview or run returns astepRunnerId, call momentic_poll_runner with timeoutSeconds greater than 0
before the next operation. Reset when accumulated state could hide a failure.
For nested steps, use the parent chain from the active session or splice response.
After about three attempts at the same failure, stop and ask the user what to do.
Disable cache only when requested, behavior must be chosen afresh, or a proven
bad match persists after correcting the description and readiness.
Get approval before previewing or running actions that submit, purchase, delete,
send, create data, or have any other non-idempotent side effect. Also get approval
for shared-module edits and expensive full-test runs. Execute approved side effects
once, following the product guide; don't preview them and replay them.
Report saved side-effect steps left unverified.
Reuse modules
For a reusable flow of roughly four or more steps, discover modules through the
product guide and read one with momentic_module_get before using it.
Modules can't contain modules. Respect declared parameters, defaults, and enums.
In MCP step strings, inputs are JavaScript expressions, not {{ }} templates.
Use hosted momentic_search_docs for current step options and configuration.
Read MCP setup when the
hosted server isn't connected. Without hosted sign-in, use
https://momentic.ai/docs/llms.txt.
Installs: 68.6K | GitHub stars: 18 | First seen: Apr 8, 2026


