checkout.test.yaml
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-based | Agentic | |
|---|---|---|
| Speed | Fast | Slower, the agent reasons each run |
| Determinism | Repeatable | Non-deterministic |
| Best for | Critical paths you assert tightly | Flows whose steps are not predictable |
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
Write your first agentic step
Add an AI action step with a goal and a post-condition. See agentic
testing.
Let auto-heal maintain it
Auto-heal repairs the test when the UI changes, so
routine edits do not break it.
Let the explore agent fill gaps
Run
momentic ai explore against a diff to find and draft
tests for changed journeys.Related
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.