Defect Density

Defect density is a metric used in software testing to measure the number of defects found in a software module or system relative to its size. It helps in assessing the quality of the software and the effectiveness of the testing process.

The formula to calculate defect density is:

Defect Density = Total Number of Defects / Size of the Software

 

The size of the software is typically measured in terms of lines of code (LOC) or function points (FP). For example, if a software module has 50 defects and the size of the module is 10,000 lines of code, the defect density would be:

Defect Density = 50/10,000 = 0.005 defects per LOC

This can also be expressed as 5 defects per 1,000 lines of code (KLOC).

Leave a comment

Your email address will not be published. Required fields are marked *