Paste failing Playwright into the agent, not into Slack
Description and use
During Playwright e2e debugging, the team shared screenshots in Slack, making root‑cause identification slow. By pasting the full failure block into an AI assistant, they received a quick fix and root‑cause explanation. The new workflow copies all error artifacts, limits edits, and classifies the issue type, speeding debugging and reducing flakiness.
Problem
Flaky Playwright e2e tests remain flaky because failure details are shared in Slack threads instead of being fed directly to an AI agent for debugging.
Outcome
The workflow reduced debugging time from 20 minutes to 10 minutes, prevented flaky tests from staying flaky, and ensured patches had clear root‑cause explanations.
Workflow
- Reproduce locally once if CI is flaky-suspicious
- Paste the failure block and test file path into the agent, attach relevant page‑object file
- Constrain the edit: one test file, at most one page object, keep assertion intent, prefer getByRole over CSS
- Ask the agent for a hypothesis first, then the patch
- Re‑run the single test and paste the green output back
- Merge only after verifying the patch fixes the failure
Evidence
Someone screenshot the red CI job, dropped it in Slack, and three of us spent twenty minutes guessing which locator drifted.
Paste the raw Playwright error — stack, expected vs received, the page URL from the trace — into the agent and asked it to propose a one-file fix.
Agents fix tests when you give them the same artifacts you’d open yourself: the exact assertion message, the stack, the page URL, trace/screenshot path, command
- Record date: 2026-11-01T21:43:44.607Z