1
Locator auto-healing
Re-resolve a stale target or wait for the page to settle. The current step
continues without editing the test.
2
Transient recovery
Failure recovery generates temporary steps to clear an obstruction, then
retries the failed step. The test still does not change.
3
Permanent healing
Classification and triage explain the failure, decide whether it is
healable, and permanently repair the test when possible.
4
Quarantine
Keep an unresolved flaky test running and collecting data without letting it
block CI.
Locator auto-healing
When a cached target no longer matches the page, the locator agent finds the element again from the step’s description. Smart waiting also waits for navigation, requests, and page changes to settle before the action runs. The resolution applies to the current run and never edits the test. After an eligible successful run, Momentic can save it to the step cache for fast replay.
A locator re-resolved during a run
Transient recovery
During eligible CI runs, failure recovery can generate temporary steps to clear a cookie banner, wait out a transition, or handle another transient obstruction. It then retries the failed preset step. Generated steps apply only to that run and never edit the test. Enable it inmomentic.config.yaml:
momentic.config.yaml
Permanent healing
Classification and triage form one post-run maintenance loop:- Classify examines run artifacts, repository changes, prior runs, and any service logs in the results directory. It assigns a category, reasoning, and the configured heal, warn, or fail action.
- Triage, when it runs, groups related failures, investigates those routed to healing, edits the affected tests, and verifies each proposed repair.
- Deliver opens a pull request or draft, commits the repair, prints a patch, or leaves the changes on disk according to your Triage settings.
ai.classification. Category actions and
project-specific classification guidance live in
Classification settings. You
can override an incorrect category from the run viewer.
To keep CI passing while a heal is pending, in-flow classification can return a
successful exit code for failures routed to heal or warn while failures
routed to fail still block the build. See
Let the verdict gate CI.
For CI, make sure triage runs even when the test step fails:
.github/workflows/momentic.yml
momentic ai reference covers
alternative run selectors, queue filters, parallelism, delivery overrides, and
exit codes.
If a recurring flake cannot yet be repaired, contain it with
quarantine.
Quarantine
Quarantine keeps a flaky test running without letting its failures fail the build. The run remains visible in the dashboard as a quarantined failure, so you keep the evidence needed to fix it.momentic quarantine reference
for commands and rule options.
Quarantine should be temporary. Continue with
debugging flaky tests, then remove the
quarantine when the test is stable.