flakeradar 🎯
Flaky-test radar for pytest. Tracks per-test flake rate across runs and writes a
FLAKY.md leaderboard your CI commits back — so flaky tests are named, ranked, and
impossible to ignore.
- Zero dependencies beyond pytest. Pure stdlib.
- History is a plain JSONL file (
.flakeradar/history.jsonl) you commit to the repo — that's what makes "across runs" work on stateless CI runners. - Scores flakiness, not failure: a test that always fails scores 0 (it's broken, not flaky). A test that alternates pass/fail scores near 1.
Install
pip install pytest-flakeradar
Use
pytest --flakeradar
Every run appends one record to .flakeradar/history.jsonl, rescores the window, and
rewrites FLAKY.md:
| # | Test | Flake score | Recoveries | Flips | Fail / Pass | Last outcome |
|---|---|---|---|---|---|---|
| 1 | tests/test_api.py::test_ws_reconnect |
0.75 | 1 | 2 | 2 / 2 | passed |
Flake score = (intra-run recoveries + inter-run flips) / runs seen, over the last
--flakeradar-window runs (default 50).
- Recovery: failed then passed within one run (e.g. pytest-rerunfailures retries). The strongest flake evidence there is.
- Flip: final outcome changed between consecutive runs.
Options
| Flag | Default | |
|---|---|---|
--flakeradar |
off | enable recording + leaderboard |
--flakeradar-dir |
.flakeradar |
history directory (relative to rootdir) |
--flakeradar-md |
FLAKY.md |
leaderboard path; "" disables |
--flakeradar-window |
50 |
runs to score over |
--flakeradar-keep |
200 |
max runs kept in history |
--flakeradar-top |
20 |
max leaderboard rows |
--flakeradar-fail-above SCORE |
off | exit non-zero if any score ≥ SCORE (CI gate) |
CLI (no pytest run needed)
flakeradar report # print the leaderboard
flakeradar md --out FLAKY.md # regenerate the markdown
CI setup (the commit-back loop)
The runner is stateless, so persist history by committing it back. GitHub Actions:
see examples/github-actions.yml — run pytest with
--flakeradar, then commit .flakeradar/history.jsonl + FLAKY.md with
[skip ci]. GitLab and Buildkite equivalents live in examples/ too.
Prefer not to commit? Restore/save .flakeradar/ with your CI cache instead — the
leaderboard still works, it's just not visible in the repo.
CI providers
flakeradar stamps each run with provider metadata (run id/URL/branch/commit), detected from environment variables. Built-in adapters: GitHub Actions, GitLab CI, Buildkite, CircleCI, Jenkins, with a local fallback.
Your provider missing? That's a ~20-line PR. See
CONTRIBUTING.md — one small class with detect(env) and
run_meta(env). Third-party packages can also register adapters via the
flakeradar.adapters entry-point group without touching this repo.
License
MIT © Sophie Nguyen (Nguyễn Thu Thuỷ)
Metadata
Release files for pytest-flakeradar 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_flakeradar-0.1.0.tar.gz | 13.6 kB | With provenance | Details for pytest_flakeradar-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_flakeradar-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytest_flakeradar-0.1.0-py3-none-any.whl |
Total release size: 26.2 kB
Release files / pytest_flakeradar-0.1.0.tar.gz
| Download URL | pytest_flakeradar-0.1.0.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32c9b5c168b4b384838f149c123fc5edb07a6318b2757f8bb4e2e8d8f5e8e297
|
|
BLAKE2b-256 checksum How to use checksums |
e90484bac281de0cba35884f9ea344bccfc425ee901cbc6e9d2f123d113f5a86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logRelease files / pytest_flakeradar-0.1.0-py3-none-any.whl
| Download URL | pytest_flakeradar-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95036488977c2e0e6affbe3db6f2f53b8f281cee22b23e0848251ab8fa2f2e64
|
|
BLAKE2b-256 checksum How to use checksums |
ee4dc897fa6ee76cbcc0361b3f497406e520dc1c1f6b146c8974c2037c5d5fb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logSecurity for pytest-flakeradar 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pytest_flakeradar-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.