flakestat
Find flaky tests in any language. No SaaS, no account, no data leaving your machine.
A flaky test passes and fails randomly on the same code. flakestat tells you exactly which ones, ranked worst first.
flakestat hunt --runs 20 \
--junit 'reports/junit-{run}.xml' \
-- pytest -q --junitxml='reports/junit-{run}.xml'
VERDICT SCORE RUNS PASS/FAIL TEST
flaky 0.62 20 14/6 tests.test_auth::test_refresh_token
consistently-failing 0.00 20 0/20 tests.test_billing::test_discount
1 flaky, 0 suspect, 1 consistently failing, 1 stable, 1 unscored (of 4 tests)
Install
pip install flakestat
This package downloads the prebuilt flakestat binary for your platform
(macOS, Linux, Windows on x86_64/arm64) from GitHub Releases on first use. It has
no Python dependencies, so it cannot interfere with your project's resolution.
Why the verdicts matter
Flakiness is inconsistency, not failure. A test that fails 100% of the time
scores 1.0 on failure rate but isn't flaky — it's broken. flakestat scores
state transitions (pass→fail→pass), so an always-failing test correctly scores
zero and is reported separately as consistently-failing instead of being mixed
in with real flakes.
Skipped tests are excluded rather than treated as passes, so @pytest.mark.skip
never manufactures a phantom transition.
How it compares
pytest-rerunfailures and pytest-flakefinder retry tests so a run goes green.
That hides the symptom. flakestat measures which tests are unreliable and by
how much, so they can be fixed — and it works across every suite in a polyglot
repo, not just the Python one.
Tracking over time
A burst proves flakiness exists. History measures it, and catches environment-dependent flakes a local burst never will.
flakestat ingest 'reports/**/*.xml' # in CI, after tests
flakestat report --top 20
flakestat report --fail-on-flaky # exit 1 to gate a pipeline
History lives in .flakestat/runs.ndjson — one JSON object per line. Commit it
for shared team history, or keep it as a CI artifact.
Environment variables
| Variable | Effect |
|---|---|
FLAKESTAT_BINARY |
Use this binary instead of downloading |
FLAKESTAT_SKIP_DOWNLOAD |
Fail instead of downloading |
FLAKESTAT_CACHE_DIR |
Where the binary is cached |
Full documentation
https://github.com/rowhitswami/flakestat
MIT
Release files for flakestat 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flakestat-0.1.1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flakestat-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / flakestat-0.1.1.tar.gz
| Download URL | flakestat-0.1.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
447aada9c778d39e169c497ea17fa324490df58f805c927001fdc4651879a4a0
|
|
BLAKE2b-256 checksum How to use checksums |
0f59d7e4ffd4418fe0aa9f639edad05fa576bc021d5cb8d62dbce08ee6b8937e
|
| 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 Sep 6, 2026.
Transparency logRelease files / flakestat-0.1.1-py3-none-any.whl
| Download URL | flakestat-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c94dd1cd638a9aef81673a28de8faea7a647ba9610f8962720a807c0d6a660a
|
|
BLAKE2b-256 checksum How to use checksums |
421fa4a962ea81ce0686b6fc9aab511b052e445117eb275e274f79d1c74421c4
|
| 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 Sep 6, 2026.
Transparency log