Skip to main content
Momentic tests can mix preset steps and AI actions. A preset step names an operation, such as clicking Sign in or checking that a dashboard loads. It can still use AI to locate an element or evaluate an assertion. An AI action gives a runtime agent a goal and lets it choose the steps. Use one when the path depends on the current application state. Review its trace and assert the expected outcome.

When to reach for agentic testing

  • Dynamic flows where the UI changes based on feature flags, A/B tests, or user state
  • High-level acceptance checks (“confirm a new user can sign up and reach the welcome screen”) without prescribing each click
  • Exploratory coverage: investigate flows outside your existing tests. Use Mo when you want a session with a coverage report and bug evidence.
  • End-to-end smoke tests after deploys (“complete an order”) with the agent handling whatever the current UX looks like
Prefer preset steps for critical paths where you need an explicit sequence and specific assertions.

AI action

AI action is the step behind agentic testing. It accepts a natural-language goal and lets the agent drive the browser or app until the goal is complete.
signup.test.yaml
The agent picks elements, types values, scrolls, waits for network activity, and handles modal dialogs on its own. When the agent reaches the goal, the step passes; when the agent gives up or times out, the step fails with a trace of what it tried.

Version: V2 vs V3

AI action ships in two versions, selectable per step from the Version dropdown in the editor.
  • V3 (beta, recommended): a planner-style agent that drafts the full flow up front, caches the resolved steps after the first successful run, and self-heals when a cached step misses. Reruns are faster and more deterministic than V2. V3 also supports optional Pre-condition and Post-condition checks that run as protected guards around the generated flow and cannot be modified by the agent.
  • V2: the previous generation. A fully dynamic agent that decides each step at runtime and does not cache the generated trajectory. Momentic keeps V2 available as a fallback for flows where V3 does not yet work well.
The V3 AI action is in beta and may change.
V3 is available for web and mobile. New AI action steps default to V3; you can keep existing V2 steps, but the editor does not offer V2 for new steps.

Pairing with assertions

Wrap agentic steps with explicit assertions (AI check, Page check, Element check) so you verify the outcome, not only that the agent “finished”. Agentic steps are flexible but non-deterministic; assertions check the result.

Reliability tips

  • Keep goals short and specific. “Sign up a new user with a fresh email” is better than “Test the onboarding flow thoroughly.”
  • Provide context the agent can’t infer. If there’s an invite code, pass it in via variables.
  • Add a fallback assertion right after the agentic step so failures surface with a meaningful message.
  • Combine this with locator auto-healing and step cache. V3 caches the resolved steps after a successful run and replays them deterministically on later runs.