Quality is inversly proportional to defects.Software is tested based on various parameters like quality,performance,security,functionality and many more important parameters.Software developers must find the errors/defects and fix it before delivering it to clients.An early fix of the defect will reduce the cost marginally.In order to calculate quality of software developers use defect density.The process of defect detection ensures that the end product meets the client standards and needs.
More Defects = Less Quality
Less Defects=More Quality.
Defect Density indicates the number of bugs found in the software or product.
Steps to calculate Defect Density:
Defect Density= Average number of Defects/KLOC.
where KLOC is lines of code per thousands
Eg.
Module 1 = 10 bugs
Module 2 = 15 bugs
Module 3 = 10 bugs
Total bugs=10+15+10 =35
Lines of Code
Module 1 =1000
Module 2=2000
Module 3=500
Total Lines of Code= 1000+2000+500=3500
Defect Density = 35/3500 =.01 Defects/LOC = 10 Defects/KLOC.
Advantages:
1.Detect areas that need improvement.
2.Identify components of high risk.
3.Helps testers to estimate amount of testing required.
4.Understand quality of product.