Skip to main content

Crate dev_flaky

Crate dev_flaky 

Source
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 countFail countClassificationVerdict
> 00StablePass
> 0> 0FlakyWarn
0> 0BrokenFail

A reliability_threshold(pct) builder lets you classify “mostly-passes” tests as flaky too — e.g. a 99%-passing test still deserves attention.

Structs§

FlakyProducer
Producer adapter that drives a FlakyRun and converts the result into a Report.
FlakyResult
Result of a flaky-test detection run.
FlakyRun
Configuration for a flaky-test detection run.
TestReliability
Per-test reliability record.

Enums§

Classification
How a test was classified after the repeated run.
FlakyError
Errors that can arise during a flaky-test run.