0:0026:53

Self Healing Playwright Test Workflow using Github Actions and Claude Agent SDK

Ramya Authappan 26:53 2026

Left unguarded, AI agents fix the app code just to make tests pass

Every failing end-to-end test can cost a developer two to four hours of logs, stack traces and local replays. Hand the job to an unguarded AI agent and it may change application code just to turn the test green. Ramya Authappan, a QE architect with 15+ years in quality engineering who built a self-healing Playwright pipeline for a client, tackles the question: which failures should an agent fix, and which belong to humans?

Get the guardrails, MCP tools and failure triage that let an AI agent heal Playwright tests safely

Watch on YouTube

In short

Ramya Authappan explains how she built a self-healing Playwright workflow in which a pull request slash command triggers a GitHub Action and a CI pipeline running an agent built on Claude Agent SDK and Playwright Test MCP. The agent reproduces and classifies each failure, then either commits a minimal test fix or reports a backend bug to humans. She argues that strict guardrails and a human in the loop are what make the approach safe.

“Should it fix the code so that the test passes? Or should it fix the tests so that the code is, is verified, right?”
“So yeah, when it is an actual application error or a bug, it does not try to fix it. It would just report back with all the analysis and calls for human intervention.”

What you will learn

  • Design a slash-command workflow where a PR comment triggers a GitHub Action and a CI healer pipeline running a Claude Agent SDK agent.
  • Use Playwright Test MCP tools (test_run, test_debug, test_list) so an agent reproduces and debugs failures the way an engineer would.
  • Write prompt-file guardrails: edit only Playwright tests, apply minimal stack-trace guided fixes, ban timeout band-aids and cap iterations.
  • Classify failures as selector drift, backend bugs or environment issues before letting an agent change anything.
  • Decide when to relax rules in an interactive local mode versus a strict autonomous CI mode.

Key takeaways from the speaker

  • How Playwright Test Healer integrates with Claude Agent SDK and MCP for AI-powered test context
  • How Single slash command triggers autonomous debugging and fixes using AI agents
  • Seamless GitHub Actions workflow for automated test healing and intelligent failure analysis
  • Quantitative results: reduced MTTR, increased test stability, reclaimed developer hours

Details

Level
Intermediate
Format
Tech talk
Technical depth
Practitioner
For
Mid-career, Senior individual contributor
Length
26:53
Published
July 2026

Questions this talk answers

Why isn't pasting a stack trace into a chatbot enough to fix a failing Playwright test?

A chatbot can offer reasoning, but real debugging means reproducing the failure, running the test in a browser and inspecting it. MCP servers such as Playwright Test MCP give the agent the tools to do exactly that, which makes its analysis more accurate.

Should a self-healing agent change the application code or the test?

In CI mode the agent may only edit the Playwright tests, because agents have been seen changing application code just to make a test pass. If logs show a backend bug or a 400 or 500 error, it reports its root cause analysis in a PR comment instead of fixing anything.

What guardrails keep a test-healing AI agent safe?

Apply only the minimal fix, make stack-trace guided changes only, avoid unnecessary refactoring and never add timeouts as band-aids for flaky tests. The agent also runs as a non-root user and stops at a maximum iteration limit (50 in her setup), after which a human steps in.

What is the difference between Playwright MCP and Playwright Test MCP?

Playwright MCP is used for browser automation, while Playwright Test MCP is specific to test automation. Only Playwright Test MCP exposes the test_run, test_debug and test_list tools.

How does running the healer locally differ from running it in CI?

Locally, as a Claude skill, the developer watches the debugging and chooses which changes to accept, so the rules are relaxed and the agent can also fix application code. In CI it runs autonomously, so the rules stay strict.

About this talk

Modern web applications demand robust end-to-end test coverage, yet maintaining Playwright test suites at scale remains a persistent engineering challenge. Flaky tests, selector drift, and timing issues can consume significant developer time—time better spent on feature development.In this talk, I'll share how we built a fully autonomous test healing pipeline that transforms how our team handles E2E test failures. Our system leverages the Model Context Protocol (MCP) to create an intelligent agent that doesn't just identify failures—it fixes them.What you'll learn:

The Architecture: How Playwright Test Healer integrates with MCP to provide AI agents with deep test context, browser automation capabilities, and codebase awareness

CI/CD Integration: Our approach to embedding the healing workflow seamlessly into GitHub Actions, including failure detection, triage, and automated fix generation

Developer Experience: How we simplified the entire workflow to a single slash command—/fix-playwright-test <test_file>—that triggers autonomous debugging, generates fixes, and commits suggestions directly to your PR

Real-World Impact: Quantitative results showing reduced mean-time-to-recovery, increased test stability, and reclaimed developer hours

The result? A paradigm shift from reactive debugging to proactive test maintenance. When tests fail in CI, an AI agent analyzes the failure, navigates the application, identifies the root cause, and proposes fixes—all without human intervention.This isn't just about fixing broken tests; it's about reimagining developer productivity in the era of AI-assisted development.

Topics

Software engineering and cloudQuality and testingAI and dataGenerative AI and agentsCloud and DevOpsTest automationBuilding AI agentsDevOps and CI/CDPrompt engineeringSoftware testingBuild technical depth

Related talks

Browse the library