Talk
Self-healing: how AI repairs a broken test
Self-healing repairs a test when the site changes. Three approaches with AI, from the most guided to the most autonomous, and their limits (ParisTestConf 2026).
Create your tests
Run them
Keep them up to date
By stage
Who it’s for
One folder, one command: Claude explores a site, plans its tests, runs them with Playwright, and delivers a report backed by proof. 15 minutes to set up.
How I gave Claude a spec so it would write and run its own E2E test plan, in a real browser, with a visual report at the end.
You describe the site to test in a plain text file. Claude explores it on its own, plans a list of tests, runs them in a real browser through Playwright, then produces a visual report with an honest verdict for each one: 🟢 OK, 🔴 bug, or 🟠 “to check.”
The key words are autonomous but auditable: Claude does the work, but every verdict is backed by an observation and a screenshot. No black magic.
By the end of this tutorial, you’ll have a folder that runs plan → test → report in one command. Allow 15 minutes to set it up.
You don’t need to know how to code, or to master Node.js or Playwright. Node.js runs behind the scenes, and Claude Code drives the browser for you. In practice: you download the folder, open Claude Code in it, and talk to it.
The folder was built by our French team, so its files and commands have French names. You can talk to Claude in English.
You have nothing to build: the qa-agent folder is already organized around Claude Code commands (Markdown files) and two scripts. Here’s what it contains:
qa-agent/
├── .claude # /preparer, /cible, /plan, /test, /rapport, /agent-qa
├── cible.md # WHAT WE WANT TO TEST (the only file to fill in)
├── lancer.mjs # runs plan → test → report
├── construire-rapport.mjs # generates the HTML report
└── captures/ # screenshots (proof)
The guiding principle: everything is in human-readable Markdown. No JSON in the working files. Anyone can review the plan and the results without knowing how to code.
Claude Code handles the browser connection. It detects what it needs on its own and simply asks you, the first time, to allow the “Playwright server.” You accept, and you’re done. Same for Node.js.
You don’t fill in any file by hand. You start the agent, for example by typing “I want to run the QA agent” (or the /agent-qa command), and Claude Code takes care of everything.
It first runs all the technical checks it needs to make sure it has everything, then asks you a few questions:
From your answers, Claude fills in the cible.md file itself: you don’t have to touch it. The result looks like this:
## Site URL
https://www.mysite.com/
## What I want to test
No spec: "blind" test. Discover the site and cover the basics.
## Number of tests wanted (rough)
~10
## Limits to respect
- Do NOT actually submit any form (no account, no payment).
- Read and browse only: no destructive action.
Two things matter: the spec (or “none”) and the limits. The limits are sacred: they stop the agent from sending a real contact form or triggering a payment. If you don’t set any, the agent stays in read-and-browse mode by default, without breaking anything.
⚠ This project is flexible. If something isn’t done the way you want, or you have specific needs, ask Claude what should change in the project: it will make the adjustments.
First phase. Claude reads cible.md, explores the site in the browser, and writes a plan in plan-de-test.md. It runs no tests here: it observes and plans.
This phase should start automatically; if it doesn’t, ask Claude.
The result: a numbered, readable plan, along the lines of T01 — The home page loads, with a goal, steps, and an expected result.
💡 Why separate planning and running? Because the plan is an artifact that a human reviews and corrects before the tests run. That’s what makes the system auditable rather than a black box.
Second phase. Claude runs each test of the plan in the browser, takes a proof screenshot for each test, and writes an honest verdict in resultats.md.
The three golden rules of this phase:
That 🟠 is the heart of the system’s honesty. A tester who makes up “OK”s is worse than useless. Here, uncertainty is a status in its own right.
Third phase: Claude Code turns resultats.md and the screenshots into a standalone report (a single file, screenshots included, that opens offline).

⚠ The most important lesson of the project. At first, I asked Claude to generate the report’s HTML itself. Bad idea: encoding more than 20 screenshots in base64 in a single call is too heavy. The phase “failed” silently and left an old report in place. The right approach: generate the report deterministically, with a Node script. It hasn’t failed since, and it frees the AI from mechanical tasks where it adds nothing.
The construire-rapport.mjs script reads the Markdown results, encodes the screenshots, and produces a scoreboard (🟢/🔴/🟠 counters) plus one accordion card per test: a clickable header, a chevron that rotates, bugs open by default. Readers expand what interests them.
The general rule to remember: have the AI do what takes judgment (exploring, deciding a verdict), and have code do what takes reliability (assembling a file).
To stop typing anything by hand, you can ask Claude Code to run the whole process (node lancer.mjs).
The script chains the AI phases (plan → test) in non-interactive mode, then generates the report locally, adds up the tokens used, and archives each run’s report in its own folder:
runs/
├── mysite_2026-06-01_15-11/rapport.html
└── mystore_2026-05-28_09-30/rapport.html
The “subject” (mysite, mystore) is taken automatically from the URL, and the date and time keep a run from overwriting the previous one. That gives you a history per site, over time.
Since it’s a single command, you can ask Claude Code to turn it into a scheduled task (cron), for daily monitoring for example.
runs/<subject>_<date>/ folder per run (step 6)..gitignore.With one command, I have a tester that:
It all stays local and auditable: the plan can be reviewed, the verdicts rely on screenshots, and every run is archived. Autonomous, but under control.
The complete code (commands and scripts) fits in a folder you can download and run in 15 minutes. That’s exactly the spirit of Qanary: serious tests, without the friction.
Let’s be clear about when this agent is the right tool, because that’s what matters most.
This agent shines at one thing: exploration. Discovering a site, casting a wide net, checking the basics, clearing up doubts: that’s where it’s unbeatable, because it understands what it sees and adapts on its own.
For precise, repeated automation, on the other hand (replaying exactly the same regression scenario every day), a dedicated platform like Qanary is a better fit. You don’t want a test to “think” all over again every morning: you want it to reproduce the scenario identically, quickly, and deterministically. An agent that reinterprets the page on every run is great for discovery… and counterproductive when you’re looking for stability.
Making an AI think at every step uses tokens, a lot of tokens. For a one-off exploration, it’s well worth it: a few euros for a full audit is hard to beat. But if you want to run 50 tests a day, every day, the bill quickly gets unreasonable. You’d be paying for intelligence where all you need is reliable repetition.
That’s also one of the reasons to use Qanary. Our approach: put AI in the right places (understanding a page, validating steps, explaining a failure in plain language), but keep a classic, deterministic test engine for repeated runs. The result: much cheaper and more relevant for repetitive regression tests, where pure AI would cost too much and drift.
The right question isn’t “AI or no AI?” but “AI, where exactly?” Explore with an autonomous agent; automate day to day with a platform like Qanary.
Want to see Qanary test your site? with Julia or Antoine.
Talk
Self-healing repairs a test when the site changes. Three approaches with AI, from the most guided to the most autonomous, and their limits (ParisTestConf 2026).
Talk
Define your critical journeys, document them in a spreadsheet, and move from reactive quality to quality you control: our talk at WordCamp Nice 2026.
Guide
AI writes the skeleton, the Playwright recorder supplies the real selectors, and you keep the judgment: a checkout test in about twenty minutes.
Bugs only. Promise.
30 minutes, live on your site
Shall we look at your site together?