Notes
Set it up
One command sets it up. Init agents, with the loop for your coding tool, here Claude Code; others include Codex, Copilot, OpenCode and VS Code. It creates a specs folder for plans, a seed test that sets the starting state, three agent files, and an MCP configuration for Playwright's test server. The agents are plain Markdown prompts with a tool list: read them, they are short, and you can edit them.
specs/README.md plans go here
tests/seed.spec.ts start state
.claude/agents/
playwright-test-planner.md
playwright-test-generator.md
playwright-test-healer.md
.mcp.json → npx playwright
run-test-mcp-server
loops: claude, codex, copilot,
opencode, vscode Planner
The planner runs the seed test to open the app, explores it with browser tools, and saves a Markdown plan: scenarios with steps and expected results, including edge cases and errors, each from a fresh state. This is the cheapest place to review. Check the plan against your requirements before any code exists: an agent only knows what it saw on screen, not that SAVE10 must apply at exactly fifty dollars.
25 tools (21 browser and test) 1 planner_setup_page: run the seed test, open the page 2 explore with browser_* tools 3 happy paths, edge cases, errors 4 planner_save_plan → specs/<name>.md "assume blank/fresh state"
Generator
The generator takes one scenario, performs every step in a real browser, and checks each expectation with verify tools. Then it reads the log of what worked and writes one test per file, with a comment for each step. Because it acted on the real page, its locators usually work. But its expected values come from the plan, or from what the page showed, which may be the bug.
23 tools generator_setup_page for each step: do it in the real browser browser_verify_text_visible, _element_visible, _value generator_read_log generator_write_test: one test per file, step comments
Healer
The healer runs the tests, debugs each failure, edits the code and repeats until they pass. Its instructions include updating selectors, which is useful, and fixing assertions and expected values, which is dangerous. It is told not to ask questions and to do the most reasonable thing to pass the test. If it believes the test is right, it marks it fix me, which skips it.
16 tools: test_run, test_debug, Edit, Write, browser_snapshot fix: "Updating selectors", "Fixing assertions and expected values" "do the most reasonable thing possible to pass the test" if sure the test is right: mark it test.fixme()
The tools
The agents talk to Playwright's test MCP server. On version one point six three it offers eighty nine tools, about sixty four thousand characters of definitions, so each agent file lists only the tools it needs. We called its test list and test run tools directly against ShopRung: they return the same errors and call logs you would read. The agent files ask for a cloud model, so plans, page content and code go to that provider.
89 tools, about 64,600 characters of definitions each agent sees only its list test_list: 3 tests in 3 files test_run: runs them, returns the errors and call logs the agents use a cloud model (model: sonnet in the files)
Two red tests
We ran both of our ShopRung tests through the test server with the coupon boundary bug on. Both failed, for different reasons. The cart test could not find nineteen ninety nine, because an earlier run had left items in Alice's cart: a test bug, it never resets its data. The coupon test was refused at exactly fifty dollars: a real product bug. Same red, opposite fixes.
✘ cart: getByText('$19.99')
not found
cause: an earlier run left
items in Alice's cart
→ a test bug: no reset
✘ coupon: expected "Coupon
applied", got "This coupon
needs a subtotal of at least
$50.00" → product bug The risk
Now imagine the healer at work. For the cart test, the easy fix is to expect whatever total is on screen, when the real fix is to reset the data. For the coupon test, it could change the expected message to the error, or mark the test fix me. Either way the build turns green and the bug ships. So healed changes go through review, and any change to an expected value needs the requirement behind it.
- cart test: change $19.99 to whatever total is shown → wrong, the fix is a data reset
- coupon test: accept the error message, or test.fixme() → CI goes green, the bug ships
- gate: a human reviews every change to an assertion, with the requirement id
Use it well
Used well, the agents save time. Let the planner draft, and add the business rules and edges it cannot see. Let the generator draft tests from reviewed plans. Let the healer fix locators and timing, always in a pull request. Never auto merge healed tests, and treat every fix me as a bug ticket. Putting the requirement id in the test name gives the reviewer the truth to check against.
- planner: draft plans, then a tester adds rules and edges
- generator: drafts tests from reviewed plans
- healer: locator and timing fixes, in a pull request
- never auto-merge healed tests
- a fixme needs a bug ticket
- requirement ids in test names
Common mistakes
Mistakes. Plans nobody reviewed. Expected values copied from whatever the screen showed, which turns today's bugs into tomorrow's expectations. Auto merging healed tests. Fix me without a bug ticket. Treating every red test as a broken test, when some are doing their job. And a seed test that does not reset data, so tests depend on what ran before.
- plans nobody reviewed
- expected values copied from the screen
- auto-merging healed tests
- fixme without a bug ticket
- treating every red test as a broken test
- no data reset in the seed
Say it like this
In the interview: yes, for drafting and for locator fixes, behind review. The planner drafts plans and I add the business rules; the generator writes tests from plans I reviewed. The healer is instructed to make tests pass, so it can hide product bugs. Every changed assertion is reviewed against a requirement, healed tests come as pull requests, and a fix me needs a bug ticket.
- "For drafting and for locator
- fixes, yes, behind review. The planner drafts and I add the rules; the generator writes from reviewed plans. The healer is told to make tests pass, so it
- can hide product bugs: every changed assertion is reviewed
- against a requirement, and a fixme needs a ticket."