Back to blog
Testing & Quality4 min read

Self-Healing Tests Just Became a Free CLI Command

Self-healing tests used to be a paid QA product. Playwright built it into the free CLI. Here's what that actually buys you, and what it doesn't.

Felício Santos

Self-Healing Tests Just Became a Free CLI Command

Self-healing tests used to be a line item on a QA vendor's pricing page. Now it is a free command that ships inside the test runner itself. Playwright did not partner with an AI startup for this, it built the whole thing in-house and gave it away.

What the three agents actually do

  • Planner turns a plain-language description of a flow into a structured test plan
  • Generator writes the actual Playwright test code from that plan
  • Healer catches when a test broke because the UI changed, not the behavior, and updates the test to match

This is not a bolt-on product sitting on top of Playwright. It ships in the same package, versioned with the same releases, maintained by the same team that owns the browser automation underneath it. One npx playwright init-agents and you are running all three.

Why this matters more than the free part

A self-healing test that quietly rewrites itself is only safe if you trust whoever is doing the rewriting, and Playwright's answer was to make that mechanism first party and inspectable instead of a black box from a third-party vendor. Recent releases added tracing built specifically for this: HAR recording as a first-class API, screencasts meant as an evidence trail an agent can produce, CLI debug modes an agent can attach to. This is not "AI writes your tests." It is "here is exactly how you check what the AI changed," which is the actual hard problem.

What to do with this today

Run init-agents against a real flow in your app, not a toy example, and read the generated test before you trust a word of it. Treat Healer's edits the way you would treat a teammate's automated refactor: reviewed, never merged blind. The bar for what makes a test valuable has not moved, it still has to catch a real regression. What moved is who can produce one, and how fast. If your team has been putting off end-to-end coverage because writing it is tedious, that excuse just got a lot weaker. What is stopping you from running this today?

Enjoyed this?

Explore more engineering articles from CodaCrew.