Skip to main content
Momentic tests combine exact, reviewable steps with goal-driven AI execution in one YAML file. This page covers how a test is assembled, where it runs, and how runs feed the agents and context systems below.

Anatomy of a test

A Momentic test is a sequence of steps. Three step types mix in one test: preset steps, AI actions, and modules. Some rely on AI, while others can be configured deterministically or execute code.

Human in the loop and agentic

Mix preset steps, AI actions, and module calls within one test. Modules can also combine preset steps and AI actions. Use preset steps when the path needs exact, reviewable control and AI actions when the goal matters more than the path. Preset steps can still use AI to locate elements, evaluate assertions, or extract data while keeping the sequence explicit. See File format, Steps, Variables, and Modules for the authoring syntax. See AI action for goal-driven flows.

Code integration

Use preset steps for common interactions, then drop to code when a flow needs it:
  • JavaScript steps run custom code in a sandboxed Node environment or the current browser page.
  • appium steps execute an Appium script on the current device.
  • Modules and variables connect reusable setup, application state, and data across the flow.
See Test portability and migration for where your YAML lives and how to move a suite in or out.

Run locally and in CI

A test provides immediate feedback during development and repeatable verification after a change leaves a developer’s machine. The same test files and CLI work in both loops: Use momentic run locally or in your CI system. AI test selection keeps pull-request feedback focused, while AI test maintenance turns eligible failures into recovery, diagnosis, and reviewable repairs.

CLI-based agents

Momentic exposes its AI agents through the CLI so they can be composed in CI, scripts, and custom agent loops: Commands can emit structured output and operate on repository files or saved results, so your orchestrator decides when they run and what happens next. See the momentic ai reference and MCP server.

Self-learning system

Momentic reuses context across runs:
  • The step cache reuses successful element resolutions for fast, deterministic replay.
  • Memory retrieves relevant decisions from earlier runs for locator and assertion agents.
  • The App graph turns run traces into product journeys and coverage, powering AI test selection and product risk analysis.
  • The Knowledge base adds your terminology, rules, and known flows. Your team can customize it from the dashboard.
See What is AI-native testing? for the development loop.