[01] LOOP
TestingmanualHardened

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

Kickoff prompt
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.

## Before you start

Connect plugins:
- GitHub (required) — Read branches, PRs, reviews, checks, workflow runs, and source diffs.
- Browser / Web access (required) — Open pages, inspect live state, collect evidence, and verify changes.
- Figma (required) — Inspect designs, dimensions, assets, and handoff notes.

Attach skills:
- Loop runner (required) — Self-pace iterations, run the check between passes, and stop only on the exit condition.
- Code change + local verification (optional) — Edit code safely, run commands, and keep changes scoped.
- CI debugging (optional) — Read failing checks, logs, and the smallest actionable root cause.
- Test repair (optional) — Run tests, triage failures, and avoid weakening the suite.
- Visual design QA (optional) — Compare implementation against visual expectations and capture regressions.
- Browser QA (optional) — Exercise product flows, capture visual evidence, and verify fixes in-browser.

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.

Steps

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.

Flow diagram

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