Eclectic Videos!


My TestPartner

All You Ever Wanted To Know About Defect Density

Posted on 11/26/2009 03:28:00 AM by Abhijeet Bhagat

All You Ever Wanted To Know About Defect Density

Defect Density Defined :
  • The ratio of the number of defects to program length.
  • defect density is the count of total defects identified against a particular software entity.
  • Defect density is a measure of the total known defects divided by the size of the software entity being measured.
The Formula :  Number of Known Defects / Size
Where  -  The Number of Known Defects is the count of total defects identified against a particular
software entity, during a particular time period.
Examples - Defects Found In Software Module Till Date + Defects Found During Tesing + Defects Found During Alpha and Beta Testing+ Defects Found at Customer Site(Production)

Size of the Software entity is typically measured in 1000 Lines of Code(Also Called KLOC) or Number of Function Points.

What is the use of this metric? :  The Sofware Defect Density serves as a Comparator between different modules so that the testing task force can be alligned or optimized to foucs on critical few modules therby resulting in better utilization of time and money --  They Call it as ROI(Return on Investment).
Also the metric can be used to perform a release /iteration /sprint wise comparision of quality efforts only to see if the  quality norms are being implemented.

There is a lot of debate in the area of what should be considered as appropriate size? Function Points of KLOCs.
There is another school of thought on use of KLOC that is usualy it is found that only few lines in the code are changed and other lines are untouched owing to the  fact that being legacy code.
In this perspective changed Defect density would be another useful metric where current changes are being introduced.So that we can come to know if the changes are impacting the Densities.

Changed Defect Density can also be calculated as Number of Defects per Code churns. Remember Code churns are the changes in the code from one version to another.

Recommended References :

    No Response to "All You Ever Wanted To Know About Defect Density"

    Leave A Reply

    free hit counter code
    Visitors Count