Expertise hub / AI-assisted testing
AI-assisted testing 9 min read

Three types of self-healing: selector, timing and intent-based

"Self-healing" sounds like one feature. It's really three: selector healing, timing healing and intent-based resolution, with a big difference in what they actually solve.

In practice, the term hides three fundamentally different techniques, and vendors are rarely clear about which of the three their product actually offers.

// Three healing types, three problem sizes
Selector healing~28% of failures
Timing healing~30% of failures
Intent-based resolutionredesigns & major changes

Selector healing: the best-known form

An element ID changes from submit-btn to checkout-submit. The system recognises the element via alternative attributes (text content, position, surrounding structure) and automatically updates the locator. This is what most tools mean when they claim "self-healing", and it's also the simplest form.

Timing healing: the underrated majority

A test expects a confirmation banner after a click, but the API response takes 900 ms instead of 300 ms. That's often wrongly attributed to "a broken selector", when in reality the problem is timing. A good system tries to understand the cause of the timing failure and adjusts synchronisation, waits or retries based on runtime information.

Intent-based resolution: the heaviest category

With a full redesign, it's not one element that changes, but the entire structure of a page. Intent-based healing tries to understand what a test step is trying to achieve, for example "log in with this user", and searches semantically for the right element, even if the underlying structure is completely different. This is the technically most advanced form, and also the one where quality between tools varies most.

Explicitly ask any tool that claims "self-healing" which of the three types it offers. A tool that only rewrites selectors addresses just one specific category of maintenance problems.

Self-healing is no substitute for good test automation. A test with clear intent, stable locators and correct synchronisation remains the best protection against maintenance costs. AI mainly works as a safety net for changes you can't predict in advance.

How to evaluate a tool fairly

The best approach is often a combination: stable, meaningful locators (ARIA roles, data-testid) as the first line of defence, with AI-driven fallback for whatever still changes.

An example from practice

While evaluating a self-healing tool for a client, we deliberately broke thirty tests in three ways: renaming a class, moving an element to a different spot in the DOM, and artificially delaying an API call by 800ms.

// Proof-of-concept results
Renamed class (selector healing)27 of 30 repaired
Moved element (selector healing)19 of 30 repaired
Delayed API call (timing healing)4 of 30 repaired

The vendor claimed "95% self-healing" based on their own demo application. On our own suite, with our own mix of breaking points, the tool fell well short of that marketing claim for timing-related issues. That 4 out of 30 was exactly the information that settled the decision: the tool was adopted for selector healing, backed by the team's own explicit-wait logic for timing.

How we set up this kind of test in practice

// Know what you're buying

Not sure which type of self-healing your suite needs?

We evaluate your current suite and show which healing type would make the biggest difference.

Book a call
// Read also