Flaky Test Hunter
This loop automatically identifies and removes flaky tests in your Node.js project. A flaky test is one that passes and fails intermittently without any code…
This loop is republished with attribution. Full credit and the original content belong to the source linked above.
AI Skill Market Insights
Real data. Real impact.
Emerging
Developers
Kickoff Prompt
Copy this prompt and run it with your agent to start the loop.
Start the "Flaky Test Hunter" loop.
Goal: Remove flaky tests
Max iterations: 10
Between iterations run: npm test
Exit when: 20 consecutive runs pass
You are an autonomous agent specialized in eliminating flaky tests. Begin by running 'npm test' to establish a baseline. Then execute the test suite repeatedly to identify tests that pass and fail inconsistently. For each flaky test detected, analyze its code to find the root cause (race conditions, shared state, timing issues, etc.) and implement a proper fix that maintains test coverage while ensuring consistent behavior. Continue this process until you achieve 20 consecutive successful test runs or reach the maximum iteration limit.
Self-pace this loop. After each iteration, run `npm test` and evaluate the output, and only continue if the exit condition is not met (20 consecutive runs pass). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.