Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Defect removal effectiveness

Defect Removal Effectiveness (DRE) measures how well testing and review activities remove defects before release, expressed as the fraction or percentage of total defects found and removed before release.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Defect Removal Effectiveness (DRE) tells engineers how good their test and review processes are at removing defects before software is released. Managers and test engineers use it to decide where to invest effort (reviews, more testing, better tools) and to estimate likely post-release defects and maintenance effort.

Key ideas

  • Post-release defect: a defect found after the software is delivered to users (in production or field).
  • Defect Removal Effectiveness (DRE): the fraction of the total known defects that were removed before release. It measures how effective pre-release quality activities were at removing defects.

Exact definition (unambiguous):

  • If R is the number of defects removed before release, and P is the number of defects found after release (post-release defects) within the measurement window, then DRE = R / (R + P). The result is a fraction (0..1); usually presented as a percentage by multiplying by 100.

Assumptions behind this definition:

  1. The set of defects counted (R and P) refers to the same type of defect (for example, code defects only, or requirements defects only). You must choose a consistent scope.
  2. The post-release measurement window must be defined (e.g., first year in production). Without a window, comparisons are inconsistent.
  3. All defects must be counted and attributed correctly; defects that were masked, merged or reclassified can distort DRE.
  4. For phase-level DRE (e.g., unit testing DRE), you must know defect origin (where the defect was injected). This requires defect origin tracking.

Phase-level DRE (definition and caution):

  • Phase DRE for a phase X is the number of defects found and removed in phase X divided by the number of defects that were present in the product at the start or injected during that phase and eventually discovered (either in that phase or later). Formally, if Rx = defects that originated in phase X and were removed in phase X, and Ex = defects originating in phase X that escaped to later phases and were discovered later, then Phase DREx = Rx / (Rx + Ex).
  • This requires accurate defect-origin classification (where the defect was injected). If origin is not tracked, phase DRE cannot be computed reliably.

Why DRE matters in practice:

  • It is a simple, interpretable metric. High DRE implies most defects were caught before release; low DRE suggests more defects escape to users, increasing cost and risk.
  • Used to compare testing approaches, to set exit criteria, and to estimate post-release defect counts for planning.

Diagram to draw for an exam (describe exactly):

  • Draw a horizontal timeline with boxes for phases: Requirements -> Design -> Coding -> Testing -> Release.
  • Draw small circles (defects) inside or above phases where they were injected; draw arrows showing some defects found in the same phase (crossed out) and some arrows continuing to later phases where they are found and removed. Label counts: Rx for removed in phase X, Ex for escaped from X. At the right end label P = post-release defects and R = total removed before release, then show formula DRE = R/(R+P).

Formulas

DRE = R / (R + P)

  • R = number of defects removed before release (count), P = number of defects found post-release in the chosen window (count). Dimension: dimensionless (fraction). Use when you know R and P for the same defect scope.

DRE% = 100 * R / (R + P)

  • The same as above, expressed as a percentage.

For phase X: Phase_DREx = Rx / (Rx + Ex)

  • Rx = defects removed in phase X, Ex = defects injected in phase X that escaped and were discovered later. Dimension: dimensionless. Applies only if defect origin can be traced.

Solving for allowed post-release defects when you have a target DRE: P_allowed = R * (1 - DRE_target) / DRE_target

  • R = pre-release defects removed; DRE_target is fractional target (e.g., 0.95). Use when you want to know how many post-release defects are consistent with a target DRE and current pre-release removals.

Combining multiple phases to an overall DRE: Overall_DRE = (sum of defects removed before release) / (sum removed before release + post-release defects)

  • This is the same R/(R+P) but R may be aggregated from phases.

Units: all formulas use simple counts (no SI units). Results are fractions or percentages (dimensionless). Edge cases: if R+P = 0, DRE is undefined; if P = 0 and R > 0, DRE = 1 (100%).

Worked examples

Example 1 — Simple project-level DRE (numerical): Given: During testing and reviews before release you removed R = 450 defects. During the first year after release users reported P = 50 defects. Steps:

  1. Write formula: DRE = R / (R + P).
  2. Substitute: DRE = 450 / (450 + 50).
  3. Compute denominator: 450 + 50 = 500.
  4. DRE = 450 / 500 = 0.9.
  5. Convert to percent: DRE% = 0.9 * 100 = 90%. Answer: DRE = 90% (meaning 90% of known defects were removed before release).

Interpretation: With 90% DRE, 10% of the defects discovered in the measurement window escaped to production. If the project wanted 95% DRE, allowed post-release defects would be: P_allowed = 450*(1 - 0.95)/0.95 = 450*0.05/0.95 ≈ 23.68 → about 24 defects.

Example 2 — Phase-level DRE (trace and compute): Scenario: During unit testing:

  • Defects injected in coding that were removed in unit testing Rx = 120.
  • Defects injected in coding but escaped unit testing and were found later in system testing Ex = 30. Compute Phase_DREunit_testing (for coding-originated defects) = Rx / (Rx + Ex) = 120 / (120 + 30) = 120 / 150 = 0.8 = 80%. Step-by-step: formula, substitute, add, divide, convert to percent. Answer: Phase DRE for unit testing (for coding-originated defects) = 80%. Note: This requires accurate tracing of defect origin (we assumed defects were correctly classified as injected in coding).

Example 3 — Using target DRE to find allowed post-release defects: Given R = 600 pre-release defects removed, target DRE = 98% (0.98). Compute allowed P. Formula: P_allowed = R * (1 - DRE_target) / DRE_target. Substitute: P_allowed = 600 * 0.02 / 0.98 = 600 * 0.020408163 = 12.2449 → round to 12 defects. Answer: About 12 post-release defects are consistent with 98% DRE.

Common mistakes

  • Not defining the post-release measurement window. Counting an unlimited or undefined period makes comparisons meaningless.
  • Forgetting to trace defect origin for phase DRE; then phase DRE is invalid.
  • Treating DRE as a complete measure of quality; DRE ignores defect severity and customer impact (many low-severity defects could give high DRE but poor user experience if missed few critical defects).
  • Mixing percentages and fractions in calculations without converting correctly.

For your exam

Types of questions you will get:

  • Definitions: define DRE, post-release defect, phase DRE.
  • Short notes: explain assumptions and limitations of DRE, and how to use it for release decisions.
  • Numerical problems: compute DRE given counts, compute allowed post-release defects for a target DRE, compute phase-level DREs.
  • Diagram questions: draw a timeline showing defects injected, removed, and escaped across phases and label quantities.
  • Derivations: show algebra to compute P_allowed from DRE target and R.

What a full-marks answer includes:

  1. Clear definitions for all terms used (DRE, R, P, phase DRE) with bold terms as named.
  2. The correct formula DRE = R/(R+P) and explanation of each symbol and assumptions.
  3. For numericals: write formula first, substitute numbers, show intermediate arithmetic with units (counts), final answer as fraction and percent, and a short interpretation.
  4. For diagrams: the timeline with phases, defects injected, arrows for escapes, labels Rx and Ex, and final R and P counts with formula.
  5. For derivations: show algebra step-by-step and mention required assumptions (measurement window, scope consistency).

Quick check

  1. If R = 200 and P = 50, what is DRE%?
  2. What must you know to compute a phase-level DRE correctly that is not required for project-level DRE?
  3. If you removed R = 300 defects and want DRE = 95%, how many post-release defects are allowed (nearest whole number)? Answers: 1. DRE% = 100 * 200/(200+50) = 100 * 200/250 = 80%. 2. You must know defect origin (where defects were injected) to separate Rx and Ex. 3. P_allowed = 300*(1-0.95)/0.95 = 300*0.05/0.95 ≈ 15.79 → about 16 defects.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?