flakewall
Language-agnostic flaky test guard for CI. Parse JUnit XML, score flakiness, quarantine known flakes, and selectively retry tests (pytest/jest) – all via a tiny CLI.
What it does (simple explanation)
Flaky tests are tests that sometimes pass and sometimes fail without code changes. flakewall helps you:
- Identify flaky candidates by scanning JUnit XML across runs
- Prevent known flakes from breaking CI (quarantine)
- Optionally re-run failing tests to prove they’re flaky (then auto-quarantine)
Why it’s useful
- Works with any language that can emit JUnit XML
- No vendor lock-in, no background service – just a small CLI
- Plays nicely with your existing CI and test runner
Install
Pick one of the following (no PyPI required):
From source (recommended for dev):
git clone https://github.com/Cicatriiz/flakewall.git
cd flakewall
make dev # creates venv and installs in editable mode
# or
python -m venv .venv && . .venv/bin/activate && pip install -e .[dev]
pipx (isolated, global CLI without polluting system site-packages):
pipx install git+https://github.com/Cicatriiz/flakewall.git
Docker (no local Python required):
docker run --rm -v "$PWD":/work -w /work python:3.11-slim bash -lc \
"pip install git+https://github.com/Cicatriiz/flakewall.git && flakewall --help"
From PyPI (optional):
pip install flakewall
Quick start
# 1) Generate JUnit XML in your test run
pytest --junitxml=reports/junit.xml
# 2) Initialize config files
flakewall init
# 3) Guard CI: exit non‑zero only if non‑quarantined failures exist
flakewall guard --junit "reports/**/*.xml"
# 4) Score flakiness across multiple reports (optional)
flakewall score --junit "reports/**/*.xml" --min-total 2 --json > flakewall_score.json
# 5) Retry specific failing tests (pytest/jest) and optionally auto‑quarantine
flakewall retry --framework pytest --from-junit "reports/**/*.xml" --max-retries 1 --auto-quarantine
Commands
init– creates.flakewall/config.ymland.flakewall/quarantine.ymlreport– lists current failing test IDs and marks quarantined onesguard– exits 0 if failures ⊆ quarantine; else exits 1. Flags:--gh-annotations,--slack-webhook URLscore– detects pass/fail flips across JUnit files; supports--jsonand--rich(adds flips, instability index, and streaks)auto-quarantine– adds flip-prone tests above a--thresholdto quarantine; optional--ttl-runs Nto auto-unquarantine after N runsretry– re-runs tests up to--max-retries; can--auto-quarantineproofs of flakiness; supports--json; optional--junit-out pathto write a merged JUnit
Configuration
Files created by init under .flakewall/:
config.yml– for example:retries: 0 report_glob: "**/junit*.xml"
quarantine.yml– list of quarantined test IDs:quarantined: - package.module::TestClass::test_name
CI examples
- GitHub Actions:
examples/ci/github-actions.yml - GitLab CI:
examples/ci/gitlab-ci.yml - CircleCI:
examples/ci/circleci-config.yml - Azure Pipelines:
examples/ci/azure-pipelines.yml - Jenkins:
examples/ci/Jenkinsfile
Supported inputs and runners
- Input: JUnit XML (generic, from any language)
- Retry adapters:
- pytest (default;
-k <Class and name>) - jest (
-t <name>; include file path viapath/to/test.spec.ts::test nameif needed) - vitest (
vitest run -t <name> [file]) - go (
go test -run <name> ./...) - dotnet (
dotnet test --filter FullyQualifiedName~<name>) - shell (generic template; provide
--cmd '...{test}...')
- pytest (default;
Notes and limitations
- Quarantine is a local YAML list – keep it under review in code review.
- TTL support: run
flakewall quarantine-tickin CI to decrement TTL and auto-remove expired entries. - Flake scoring is minimal (requires only JUnit XML). It doesn’t depend on long CI history.
- Jest retry selection uses
-t <name>; include file path in test ID if multiple names collide.
Contributing
See CONTRIBUTING.md for dev setup and releasing.
License
MIT – see LICENSE.
Metadata
Release files for flakewall 0.2.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 |
|---|---|---|---|---|
| flakewall-0.2.0.tar.gz | 15.8 kB | Without provenance | Details for flakewall-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flakewall-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for flakewall-0.2.0-py3-none-any.whl |
Total release size: 32.0 kB
Release files / flakewall-0.2.0.tar.gz
| Download URL | flakewall-0.2.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a72d159ffb1727caa06445b1561d15069a297f1388e85dcda28f0656b51879ad
|
|
BLAKE2b-256 checksum How to use checksums |
6cf6f4fe31ab5865e86e6358518145617caad202574db37cdd557b1937780bf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / flakewall-0.2.0-py3-none-any.whl
| Download URL | flakewall-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
103496d08d5845719efe0679b5375008e4e62e9bb9501637e50d1c038001f81f
|
|
BLAKE2b-256 checksum How to use checksums |
5f8f8f2b71a48d58456813a63952b0c52f6843ed00ec5d08480ad411d3c4737f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for flakewall 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.