Heals locator and layout changes

Self-healing tests for locator and layout changes

When a step no longer resolves because an element moved, was renamed or restyled, the platform re-resolves it, marks the test as healed and records the change for review.

When a step no longer resolves because an element moved, was renamed or restyled, the platform re-resolves it, marks the test as healed and records the change for review. The config decides which change types are healed on their own and which wait for a person.

terminal
npx aitp heal --reviewHealedLog in with email, step 4: Click "Continue"button text and position changed, same action; waiting for approval

What it does not do

Does not heal a behaviour change; a changed outcome fails the test and goes to triage.

What the platform cannot do

When it applies

  • A redesign or component library upgrade changes selectors across many pages.
  • The team spends time after each release fixing tests that broke on markup, not on behaviour.
  • Coding agents refactor markup as a side effect of feature work.

Questions

What is self-healing test automation?

A test run that finds an element again after its locator stopped matching, instead of failing on the old selector. In AI Testing Platform the healed step is marked and recorded so a person can review it.

How does self-healing work here?

The step is written in plain English, so the platform can resolve it again against the changed page. If it finds the same element and action, the step passes as healed and the change is logged. heal.auto in aitp.config.yaml lists change types healed without a person; heal.review lists those that wait for approval.

Can healing hide a real bug?

Healing applies to locator and layout changes. A changed outcome is not healed: the test fails and goes to triage. With ci.failOnHealedPending: true, healed steps waiting for review make the run exit with code 2.

Why do end-to-end tests break after UI changes?

Tests written in code usually find elements by selectors tied to markup. When the markup changes, the selector stops matching even though the feature works. A step described in plain English does not depend on one selector.

Request early access

Early access: prices are the planned list prices. Billing starts when the platform enters beta; early-access use is not charged. We reply within 24 hours on business days.