Skip to main content
Agentic testing uses AI agents across the test lifecycle: an agent drives a flow from a natural-language goal, repairs tests when the UI changes, and proposes new tests as the product changes. Reach for it when keeping a hand-written test suite in sync with a changing product takes more effort than it is worth. An agentic step takes a goal and a post-condition. The agent drives the flow and the assertion verifies the outcome:
checkout.test.yaml
fileType: momentic/test/v2
id: checkout-happy-path
steps:
  - act:
      goal: Add an item to the cart and complete checkout as a guest.
      postcondition: An order confirmation number is visible.

When to use it

  • Your UI changes often enough that hard-coded selectors break constantly.
  • A flow’s exact steps are not predictable ahead of time: they vary by feature flag, A/B test, or user state.
  • You want coverage to stay current as the product changes without hand-writing a test for every change.

Step-based vs agentic

This is the main decision, and it is per step, not per test suite. Most tests should stay step-based; reach for an agentic step only where a fixed script does not fit.
Step-basedAgentic
SpeedFastSlower, the agent reasons each run
DeterminismRepeatableNon-deterministic
Best forCritical paths you assert tightlyFlows whose steps are not predictable
Keep critical paths step-based so they are fast and you can assert exact outcomes. Use agentic steps for the parts that genuinely vary, and wrap each one in an assertion so the outcome is still checked. See agentic testing for the full trade-offs.

Where agents help across the lifecycle

  • Authoring: write a goal as an AI action step, or run the explore agent to read a diff and draft tests for the journeys it changed. Give agents reusable context with a knowledge base so they use your terminology and flows.
  • Repair: auto-heal fixes a test mid-run when the UI changed, so a moved or renamed element does not fail a test that still works.
  • Maintaining coverage: run the explore agent on each pull request to surface changed journeys and propose tests for the gaps. See PR testing.

Keep it trustworthy

Agentic steps are flexible but non-deterministic. Constrain them so a run stays trustworthy:
  • Wrap each agentic step in an explicit assertion so a run verifies the outcome, not just that the agent finished.
  • Keep goals short and specific. “Sign up a new user with a fresh email” works better than “test the onboarding flow.”
  • Pass anything the agent cannot infer (invite codes, IDs) via variables.

Get started

1

Write your first agentic step

Add an AI action step with a goal and a post-condition. See agentic testing.
2

Let auto-heal maintain it

Auto-heal repairs the test when the UI changes, so routine edits do not break it.
3

Let the explore agent fill gaps

Run momentic ai explore against a diff to find and draft tests for changed journeys.

Agentic testing

AI action steps and when to use a goal instead of fixed steps.

Explore agent

Discover changed journeys and author tests from a diff.

Auto-healing

Repair tests when the UI changes.

Knowledge base

Give agents reusable context about your product.