bitovi/ai-enablement-prompts/debug-e2e-test
Claude Code and agent skill by bitovi/ai-enablement-prompts
- community
Checking that the SKILL.md file is still in the repository.
Debug and fix failing Playwright E2E tests. Use when tests fail, when asked to fix failing tests, or when investigating test failures. Analyzes test output, screenshots, error context, and uses Playwright MCP to identify root causes.
Install
npx vskill@latest install bitovi/ai-enablement-prompts/debug-e2e-testSKILL.md
Skill: Debug E2E Test
Systematic workflow for debugging and fixing failing Playwright E2E tests.
When to Use
- A Playwright E2E test is failing
- Asked to fix a failing test
- Investigating why tests are broken
- Tests pass locally but fail in CI
Debugging Workflow
Step 1: Run the Specific Failed Test
Run ONLY the specific failing test:
Step 2: Analyze the Test Output
Extract from terminal output:
- Test location: File path and line number
- Failure type: What assertion failed
- Expected vs Actual: What the test expected vs what it got
- Error message: The specific error
- Artifact paths: Screenshot and error-context locations
Step 3: Load the Screenshot
Use the screenshot from test results to see the visual state at failure time.
Step 4: Read the Error Context
Read any error-context.md file from test results:
- DOM snapshot
- Console logs
- Network errors
Step 5: Read the Test Code
Understand what the test is trying to do, what selectors it uses, and what assertions it makes.
Step 6: Compare Test Expectations with Implementation
Check: routes, text content, element types, selectors.
Step 7: Use Playwright MCP (If Needed)
If artifacts don't reveal the issue:
- Navigate to the page
- Take a screenshot
- Get visible HTML
- Interact with elements
- Inspect behavior
Step 8: Fix the Issue
Fix the test, the code, or both.
Step 9: Verify the Fix
Intermittent Failures — Non-Deterministic Data
If tests pass sometimes and fail other times:
Common Causes
- Sample generators using
Date.now()ornew Date() - Missing seeds in mock handlers
- Stories without seeds
How to Diagnose
How to Fix
- Update sample generators to use seeds
- Add seeds everywhere — never call sample functions without seeds
Tips
- Always run the single test first
- Start with artifacts — screenshot + error-context tell you 90% of issues
- Use MCP sparingly
- Check obvious things first — routes, text, element types
- One test at a time
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/playwright/skills/debug-e2e-test/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bitovi/ai-enablement-prompts/debug-e2e-test)