Expand description
§dev-flaky
Flaky-test detection for Rust. Part of the dev-* verification
suite.
Runs your test suite N times and tracks each test’s pass/fail history. Stable tests pass every iteration. Flaky tests fail sometimes for no apparent reason. Broken tests fail every time.
After the run every test is classified and assigned a reliability
percentage in [0, 100], then emitted as a
dev_report::Report.
§Quick example
use dev_flaky::FlakyRun;
let run = FlakyRun::new("my-crate", "0.1.0").iterations(20);
let result = run.execute().unwrap();
let report = result.into_report();§Classification
| Pass count | Fail count | Classification | Verdict |
|---|---|---|---|
> 0 | 0 | Stable | Pass |
> 0 | > 0 | Flaky | Warn |
0 | > 0 | Broken | Fail |
A reliability_threshold(pct) builder lets you classify
“mostly-passes” tests as flaky too — e.g. a 99%-passing test still
deserves attention.
Structs§
- Flaky
Producer Produceradapter that drives aFlakyRunand converts the result into aReport.- Flaky
Result - Result of a flaky-test detection run.
- Flaky
Run - Configuration for a flaky-test detection run.
- Test
Reliability - Per-test reliability record.
Enums§
- Classification
- How a test was classified after the repeated run.
- Flaky
Error - Errors that can arise during a flaky-test run.