Test Fixing Skill
Installation
SKILL.md
Test Fixing & Self-Healing
Methodology
When a test fails, do not just "try random things". Follow this procedure:
1. Diagnosis
- Read the Error: Is it
Timeout,AssertionError, orReferenceError? - Check the Artifacts: Look at the Screenshot/Video/Trace at the moment of failure.
- Isolate: Can you reproduce it with
npx playwright test --project=chromium -g "test name"?
2. Root Cause Analysis
- Race Condition: Did the test assert before the UI finished animating? (Sol:
await expectauto-retries, checkawait page.waitForLoadState()). - Data Issue: Did previous tests dirty the database? (Sol: Ensure DB reset in
beforeEachor unique naming). - Selector Changed: Did a class name change? (Sol: Update locator to be resilient).