AIniverse Get the App

Flaky Test Triage

Coding by loops! by elorm

Run failing tests repeatedly, classify each failure as flaky or real, and fix only confirmed regressions.

Prompt

Step 1 — Run failing tests
Run the failing test file or suite 3–5 times. Record pass/fail pattern per test.

Check: `npm test -- --testPathPattern=<failing-suite>`

Step 2 — Classify failures
Label each failure as flaky (intermittent) or real (consistent). Note timing, ordering, or env dependencies.

Step 3 — Fix real failures
Fix confirmed real failures with minimal changes. For flaky tests, propose stabilization (retries, isolation, mocks).

Step 4 — Confirm stability
Re-run the suite multiple times to confirm real failures are gone and flakiness is reduced or documented.

Check: `npm test -- --testPathPattern=<failing-suite>`

Step 5 — Repeat until done
Repeat the steps above until: All failures classified; real regressions fixed; flaky tests documented or stabilized
Platforms
CLAUDE

Use this prompt in AIniverse

Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.

Open in App

More Coding prompts

Independent Verifier Pass

When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implement...

API Contract Until Match

Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.

De-Sloppify Pass

After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with pro...

Merge Conflict Resolver

Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.