fix

Solid

Fix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "intermittent failure".

AI & Automation 17,886 stars 2466 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Fix Failing or Flaky Tests Diagnose and fix a Playwright test that fails or passes intermittently using a systematic taxonomy. ## Input `$ARGUMENTS` contains: - A test file path: `e2e/login.spec.ts` - A test name: ""should redirect after login"` - A description: `"the checkout test fails in CI but passes locally"` ## Steps ### 1. Reproduce the Failure Run the test to capture the error: ```bash npx playwright test <file> --reporter=list ``` If the test passes, it's likely flaky. Run burn-in: ```bash npx playwright test <file> --repeat-each=10 --reporter=list ``` If it still passes, try with parallel workers: ```bash npx playwright test --fully-parallel --workers=4 --repeat-each=5 ``` ### 2. Capture Trace Run with full tracing: ```bash npx playwright test <file> --trace=on --retries=0 ``` Read the trace output. Use `/debug` to analyze trace files if available. ### 3. Categorize the Failure Load `flaky-taxonomy.md` from this skill directory. Every failing test falls into one of four categories: | Category | Symptom | Diagnosis | |---|---|---| | **Timing/Async** | Fails intermittently everywhere | `--repeat-each=20` reproduces locally | | **Test Isolation** | Fails in suite, passes alone | `--workers=1 --grep "test name"` passes | | **Environment** | Fails in CI, passes locally | Compare CI vs local screenshots/traces | | **Infrastructure** | Random, no pattern | Error references browser internals | ### 4. Apply Targeted Fix **Timing/Async:** - Replace `wai...

Details

Author
alirezarezvani
Repository
alirezarezvani/claude-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category