Category:
Web Application Testing
Defect Density is number of confirmed defects identified in software/module during a development period divided by the size of the software. It is calculated as defect count/size of the release, where size of release is total line of code in release.
e.g. if module1 has 25 bugs, module2 has 15 bugs, and module3 has 50 bugs, total number of code per modules are module1 has 1250 LOC (lines of code), module2 has 2575 LOC , and module3 has 7500 LOC, then Total bugs = 25+15+50 = 90, and size = 1250+2575+7500 = 11325, Defect density will be = 90/11325 = 0.00794 defects/loc = 7.94 defects/Kloc.