pub struct FlakyResult {
pub name: String,
pub version: String,
pub iterations: u32,
pub tests: Vec<TestReliability>,
pub reliability_threshold_pct: Option<f64>,
}Expand description
Result of a flaky-test detection run.
Fields§
§name: StringSubject name.
version: StringSubject version.
iterations: u32Iterations actually completed (may be less than configured if a subprocess error stopped the run mid-way; in 0.9.0 we always complete the full count).
tests: Vec<TestReliability>Per-test reliability records (sorted by name for determinism).
reliability_threshold_pct: Option<f64>Reliability threshold that was active when the result was
produced. Carried so into_report can re-derive the
classification each finding would have had at execution time.
Implementations§
Source§impl FlakyResult
impl FlakyResult
Sourcepub fn stable_count(&self) -> usize
pub fn stable_count(&self) -> usize
Number of tests classified as stable.
Sourcepub fn flaky_count(&self) -> usize
pub fn flaky_count(&self) -> usize
Number of tests classified as flaky.
Sourcepub fn broken_count(&self) -> usize
pub fn broken_count(&self) -> usize
Number of tests classified as broken.
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Total tests observed.
Sourcepub fn into_report(self) -> Report
pub fn into_report(self) -> Report
Convert this result into a Report.
No observed tests → one passing flaky::scan check (the
subprocess succeeded but found nothing to classify, e.g.
because the project has no tests). Otherwise one check per
test, named flaky::<test>, with reliability percentage
attached as Evidence::Numeric("reliability_pct", pct).
Stable → CheckResult::pass. Flaky →
CheckResult::warn(Severity::Warning). Broken →
CheckResult::fail(Severity::Error).
Trait Implementations§
Source§impl Clone for FlakyResult
impl Clone for FlakyResult
Source§fn clone(&self) -> FlakyResult
fn clone(&self) -> FlakyResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more