Analyze a failed E2E test, fix the underlying issue, and verify the fix. Use after /test-e2e reports failures.
Analyze failed E2E tests, identify root causes from error logs and screenshots, fix the underlying application issues, and verify the solution by re-running tests. Use this after /test-e2e reports failures.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install google-ecosystem@melodic-softwaretest-result-jsonAnalyze a failed E2E test, fix the underlying issue, and verify the fix.
test_result: $ARGUMENTS - JSON object from /test-e2e command with failed test detailsExpects a JSON object from the /test-e2e command:
{
"test_name": "Basic Query Execution",
"status": "failed",
"screenshots": [
"screenshots/01_initial_state.png",
"screenshots/02_query_input.png"
],
"error": "Step 8 failed: Results did not appear within 5 seconds"
}
Review the test result:
Extract key information:
Read the original test specification to understand:
Review captured screenshots to:
Common E2E failure causes:
| Symptom | Likely Cause |
|---|---|
| Element not found | Selector changed, slow load |
| Wrong text | Logic error, data issue |
| Timeout | Performance issue, missing element |
| Unexpected redirect | Auth issue, error state |
| Missing element | Component not rendering |
Apply fixes based on root cause:
IMPORTANT: Fix the application, not the test (unless test is genuinely incorrect).
Execute the original E2E test again:
/test-e2e {original_test_file}
Success criteria: Test status is "passed"
Run related E2E tests to ensure fix doesn't break other flows.
Report your resolution:
## E2E Resolution Complete
### Failure Analysis
- **Test**: {test_name}
- **Failed Step**: [step number and description]
- **Root Cause**: [what caused the failure]
- **Screenshot Evidence**: [observations from screenshots]
### Fix Applied
- **File(s) Modified**: [list of files]
- **Change Summary**: [brief description]
- **Type of Fix**: [UI/Logic/Performance/Data]
### Validation
- **E2E Test**: PASS
- **Related Tests**: PASS/FAIL
- **New Screenshots**: [paths to verification screenshots]
### Notes
[Any observations or recommendations]
If the fix doesn't work:
Maximum 2 retry attempts before escalating (E2E tests are slower).
This command is the RESOLVE phase for E2E:
/test-e2e {spec} → [failure JSON] → /resolve-failed-e2e-test {result} → /test-e2e
↓
[verify fix]