E2E Until Green
Run Playwright or Cypress end-to-end tests with annotated failure screenshots, fix root causes, and loop until the suite is green.
by Trooper
Start the "E2E Until Green" loop. Goal: E2E test suite exits zero with no flaky failures Max iterations: 10 Between iterations run: npx playwright test || npx cypress run Exit when: E2E suite exits 0 Step 1: Run E2E tests. On failure, annotate with screenshots, fix root cause, and repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Paste the kickoff prompt into Cursor, Claude Code, or Codex. Deeplinks do not install hook files.
1. Run E2E suite
Execute Playwright or Cypress against the target environment.
2. Annotate failures
Capture screenshots, trace files, and label the failing step.
3. Fix and re-run
Patch root cause, then re-run the failing spec or full suite.
Guardrails
Rules the agent must follow so it cannot cheat the exit condition.
- Do not disable or delete failing tests to force green
- Attach annotated screenshots for every failure
- Fix the smallest root cause per iteration
More Testing loops
Staging Smoke Until Green
Deploy to staging, run browser smoke tests on critical paths, fix failures, and repeat until every path is green.
Test Until Green
Run your test suite, fix the smallest root cause on failure, and repeat until every test passes.
Flaky Test Hunter
Run the test suite N times on an interval, capture intermittent failures, isolate flakes, and open a fix PR.
