Skip to main content

Module escaped_defects

Module escaped_defects 

Source
Expand description

§Escaped Defect Rate and Quality Escapes

An escaped defect is one that reaches production rather than being caught before release. The escaped defect rate compares how many defects escaped against how many were found in total (pre- and post-release combined), giving a direct read on how well internal quality practices are catching problems before customers do. A raw count understates the picture: weighting by severity, using a consistent, documented scale, stops a spike in minor issues from visually swamping a smaller but far more consequential rise in critical ones.

§Formula

Escaped defect rate (%) = escaped defects / (escaped defects + caught defects) × 100
Severity-weighted score  = critical × 5 + major × 3 + minor × 1

§Why it matters

Classifying every escaped defect on a fixed severity scale, based on actual customer or business impact, and tracking a severity-weighted trend rather than just a raw count, is what keeps a handful of critical escapes from being buried under a much larger count of cosmetic ones. Standardizing classification criteria across teams matters just as much: left to classify independently, teams drift toward different standards, making cross-team comparison meaningless and creating an incentive to classify generously downward to flatter a team’s own numbers.

§Example

use software_engineering::escaped_defects::{
    escaped_defect_rate_percent, severity_weighted_escaped_defect_score,
};

// 4 defects escaped to production out of 40 found in total.
let rate = escaped_defect_rate_percent(4.0, 36.0).unwrap();
assert_eq!(rate, 10.0);

// 1 critical escape outweighs 4 minor ones under severity weighting.
let one_critical = severity_weighted_escaped_defect_score(1.0, 0.0, 0.0);
let four_minor = severity_weighted_escaped_defect_score(0.0, 0.0, 4.0);
assert!(one_critical > four_minor);
// But 10 minors already outweigh a single critical.
let ten_minor = severity_weighted_escaped_defect_score(0.0, 0.0, 10.0);
assert!(ten_minor > one_critical);
// And 3 criticals outweigh those same 10 minors.
let three_critical = severity_weighted_escaped_defect_score(3.0, 0.0, 0.0);
assert!(three_critical > ten_minor);

§Pitfalls

  • Tracking a raw escaped-defect count instead of a severity-weighted trend — lets a spike in minor issues visually swamp a smaller, more consequential rise in critical ones.
  • Letting teams classify severity independently, without a documented, audited scale — produces cross-team comparisons that are meaningless at best and gamed at worst.
  • Tracking count and severity without root cause — misses the systemic pattern (a testing gap, a missed edge case, an environment difference) that would point at a specific, fixable process gap.
  • Framing defect classification as an individual-blame exercise — creates a strong incentive to under-report or misclassify downward.

§Sources

  • Chapter 5.1, Escaped defect rate and quality escapes.

Topic doc: software-engineering-metrics/locales/en-001/chapters/05-01-escaped-defect-rate-and-quality-escapes.md

Constants§

CRITICAL_WEIGHT
Weight applied to a critical-severity escaped defect in severity_weighted_escaped_defect_score.
MAJOR_WEIGHT
Weight applied to a major-severity escaped defect in severity_weighted_escaped_defect_score. See CRITICAL_WEIGHT.
MINOR_WEIGHT
Weight applied to a minor-severity escaped defect in severity_weighted_escaped_defect_score. See CRITICAL_WEIGHT.

Functions§

escaped_defect_rate_percent
Escaped defect rate: the percentage of all found defects that escaped to production rather than being caught first.
severity_weighted_escaped_defect_score
A severity-weighted escaped-defect score, so a spike in minor issues cannot visually swamp a smaller rise in critical ones.