Defect Evaluation and Metrics

Defect evaluation is driven by the need for Defect prevention. Understanding defects and metrics surrounding them will help eliminate defect injection and rework.

Links to helpful Defect understanding techniques:
Pareto Analysis – http://erc.msh.org/quality/pstools/pspareto.cfm
The 5 Whys
Root Cause Analysis http://www.mindtools.com/pages/article/newTMC_80.htm

References:
http://www.ijcaonline.org/volume8/number7/pxc3871759.pdf
most metrics won’t mean anything at first until we can establish a baseline to compare to; some metrics may be useful out of the gate depending on project acceptance.

Useful metrics to gain:
Root Cause Analysis

This is digging deeper into the data available and the resources involved finding out why a defect has entered the system. Examples could be Developer Error, Missing Tests/Requirements, Unclear Requirements, or Environmental (Client/Server) or any of the reasons. It’s important to identify it correctly to be able to look for patterns or repeats of specific reason types. This will help to identify problem areas and propose solutions to resolve.

  1. Define the Problem
    1. What does the defect describe?
    2. Why is it a defect?
  2. Collect Data
    1. Reproducible steps(A.k.a. Proof of Defect)
    2. How long has it been in the system?
    3. Severity Impact of Defect
  3. Identify Possible Causal Factors
    1. Sequence of Events
    2. Conditions of the System
    3. Cascading Issues (Do other problems arise?
    4. Techniques to use
      1. 5 Whys
      2. Drill Down
      3. Cause and Effect
      4. So What?
  4. Identify the Root Causes
    1. Why does this problem exist?
    2. How did this problem occur?
      1. More so, how was it allowed to occur?
      2. The Real Underlying Issue
  5. Recommend and Implement Solutions
    1. What can we do to prevent future occurrences?
    2. Who will implement fix?
    3. Who owns the solutions to the root problem?
    4. Risks to fixing Root Cause?
Defect Trends

Once a baseline is started with projects, there will always be different sizes and scopes, however if a full life cycle application is used to track tasks, you can use ratios to trend, such as Features released to defect, defect ratio per developer, analyst etc. It is important to note however that the numbers still by themselves are meaningless without context, defect metrics should be a guide to point you in a direction in which better root-cause analysis should be performed.

If defects seem to have a higher attachment rate to a developer, you should investigate what types of defects they are; break down who found them, the severity and the type. From here you can see if it was related to poor coding standards, lack of simple developer testing before shipping, a constant misunderstanding around requirements, or another factor.

Defect Discovery

Another important Tester related Metric is Defect Discovery. This is measured after a project or sprint has been released to the customer. You track the defects found internally (tester’s job) to defects found externally. If the tester finds 95% of the defects, and the customer only finds 5%, you can then equate that to a cost, and form acceptable defect capture rates. It may be those 5% are all edge cases, and 10% find is acceptable, due to project costs, rework. However if the customer is finding (true defects) at a higher level the tester is, there is most likely a flaw in the process, people, technology, and understanding.

Defect per Function Points

There is also ways with unit tests/code reviews, to show code coverage, and codes with higher appropriate coverage should be less susceptible to tester defects, so you can test Developer code to Tester defect attachment, which can show, Amount of code (Function Points) to defects discovered. It would be safe to say a few defects for every X function points is acceptable, however if the defect rate per function point is high, then you can see a lot less time reading/understanding the requirements or testing before delivery is being done.

Defect Attachment

You can do Defect to Requirement attachment as well, if defects are being done registered in the design phase, to do gap analysis and where requirements may be missing or deficient.

Test Coverage Deficiency

You can also compare Test Coverage to Defect Coverage. If Test Coverage is at X% and Defect report on the feature is at Y%, it may be a long term metric to find appropriate coverage for return on test value. Over testing can be costly to an organization and these metrics can be valuable when trying to determine when over testing happens and the cost to the company.

Defect Categorization and Types

There is also usable data from Defects (Internal/External) suck as simple categorization metrics, such as environments, operating systems, web browser types, defect types, Expected Results vs. Actual, Performance related, and Usability issues. Through review, it can be shown what may be considered areas of high risk for defect accrual, which may cause process/technology/tool changes to be fixed and improved. An example would be to do Prototyping, which then reduces requirement related defects, or adding a Usability Survey Test Session to reduce defects related to UI.

Defect Investigation

The big thing with defects is to understand where in the stream they are happening, and the cost of a defect. Defects caught earlier on will cost less than defects caught downstream, as the cost of re-work and perception of quality raises or lowers. Reducing the number of defects at one point in the stream is not the same value as reducing the same amount of defects downstream.

Root Cause Analysis is the fundamental tool for all above defect understanding. Once metrics have been gathered (with scientific theory applied) they must be researched to make sure they are accurate. Asking questions and open communication is the best tool for this.

Retrospective Discussions based off defect analysis in an open forum is also a positive way to make meaningful use of this data.

Christopher Taylor

Software Engineer in Test & Agile Coach Certified Scrum Master

You may also like...

Leave a Reply

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