1. ## Defect Density

Hey,

Can someeone tell me about Defect Density and how do we calculate Defect Density?

Thanks
Puneet

2. ## Re: Defect Density

Refer the below url, u will get an idea about defect density.
http://irb.cs.tu-berlin.de/~zuse/metrics/lecture02.html

3. ## Re: Defect Density

Hi,

Defect density is the ratio of the number of defects found to the size of the artifact. It is given by
Defect Density = Total Defects Found / Size
Where the size of the artifact is measured in number of pages, loc, or other size measure.

4. ## Re: Defect Density

I have always used and referred to defect density as a predictive measure of potential defects/KLOC. Defect density is derived from several measures and often used to evaluate defect removal rates, as well as speculate on defects reamining in the product post ship. (Manufacturing also uses this measure to project losses.)

I have never seen defect density applied to actual defects found post ship as in Zuse's lecture notes linked above. Interesting idea; however, his example is not a predictive measure, but it is an example of how misused metrics can be misleading. For example, keeping all other variables constant (has he does in his example), it appears that version 2 should have a higher number of defects/loc. However, if you normalize the size (LOC) of the programs you will discover that based on the fault injection rates in version 1 if the total LOC of version 1 was similar to the total LOC of version 2 then version 1 would actually end up with approx. 140 defects/loc which in fact proves Version 1 has a greater defect density ratio as compared to version 2. This is a great trick with numbers; but serves to demonstrate that you must compare marbles to marbles, and not compare marbles to bowling balls.

5. ## Re: Defect Density

Hmm... interesting. I guess I have always used the loose definition of Defect Density: The distribution (or density) of defects across the functionality of testing.

Meaning that you look at the density, or trend occurrance, of defects within the functional areas of the system under test. This can be broken down into Status vs. Functionality (see what areas of functionality are having a lot of work going) and Severity vs. Functionality (what areas of functionality seem to be the most problematic).

Now some will argue that the numbers can be skewed because you are focusing on a particular area at that time. True, but when you look at them towards the end of the project it can give an indicator of stability/reliability of the code. This assumes, and it is a big factor, that you are also tracking your test execution and coverage along with it.

But in the "classic" definition of the term the Defect Density can be equated to the number of Defects / KLOC.

Again though, that is how I have defined and used this "metric", your mileage will vary. [img]/images/graemlins/grin.gif[/img]

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.