AI Services Market › Use cases › Software & DevOps
Software & DevOpsDone with Gemini Nov 10, 2026
Detect flaky tests and find their root causes
A QA-focused post on using Strands Agents with Gemini to detect flaky tests and trace their root causes. · Nov 10, 2026
- What They Did
- A Python tool parses JUnit XML results and scores each test by the share of commits where it both passed and failed. It writes JSON reports. A Strands Agents agent running on Gemini 2.5 Flash has two tools: one fetches reports for a chosen period, the other exports a Markdown analysis. The agent reads the error messages, infers likely root causes, and writes recommendations.
- How It Went
- On generated sample data, 12 of 109 tests were flagged from 19,644 parsed results, and the agent produced a root-cause report. The author says it gives a first look only, and infrastructure failures can look like flakiness.
- Worth Knowing
- Tests only get flagged when the same commit has both passing and failing runs. Results also need commit_sha and run_id properties, and the setup assumes GitHub Actions.
Try it yourself with Gemini
Look at the test suite in [path to repo] and CI logs from [CI system or log folder]. Find tests that pass and fail inconsistently, rerun suspicious ones [20] times to confirm they are flaky, and for each one identify the likely root cause such as timing, shared state, ordering, or network. Finish with a ranked report of flaky tests with a suggested fix for each, and don't change any code until I approve.