Defect Density

by Linda Westfall

Model:  Defect density is a measure of the total known defects divided by the size of the software entity being measured. 

Number of Known Defects / Size

The Number of Known Defects is the count of total defects identified against a particular software entity during a particular time period. Examples include:

  • Defect to date since the creation of a module
  • Defects found in a program during an inspection
  • Defects to date since the shipment of a release to the customer

 

Size is a normalizer that allows comparisons between different software entities (e.g., modules, releases, products). For software components, size is typically counted in Lines of Code, Story Points, Use Case Points, or Function Points. For documents, size is typically counted in pages or words. For testware, size is typically counted in test cases or items tested (e.g., paths, requirements, components) 

Uses:  Defect Density can be used to compare the relative number of defects in various software components. This measure helps identify candidates for additional inspection or testing or possible re-engineering or replacement. Identifying defect-prone components allows the concentration of limited resources into areas with the highest potential return on the investment. Figures 1 and 2 illustrate typical reporting formats for Defect Density when utilized in this manner.

Another use for Defect Density is to compare subsequent releases of a product to track the impact of defect reduction and quality improvement activities. Normalizing by size allows releases of varying sizes to be compared. Differences between products or product lines can also be compared in this manner. Figure 3 illustrates a typical reporting format for Defect Density when utilized in this manner. 

Click Here to Download this Article

The Westfall Team Posts Metrics, Measures & Analytical Methods Resources.

These resources are free to anyone who wants to read or download them. Subscribe to the Software Excellence Academy to be notified when new resources are added.