0
0
Testing Fundamentalstesting~6 mins

Defect metrics in Testing Fundamentals - Full Explanation

Choose your learning style9 modes available
Introduction
When building software, it is important to know how many problems or bugs exist and how serious they are. Defect metrics help teams measure and understand these problems so they can improve the quality of their software.
Explanation
Defect Density
Defect density measures how many defects are found in a certain size of software, usually per thousand lines of code. It helps teams see how error-prone the software is compared to its size.
Defect density shows the number of defects relative to the size of the software.
Defect Severity
Defect severity describes how serious a defect is and how much it affects the software's functionality. High severity defects cause major problems, while low severity defects are minor issues.
Defect severity ranks defects by their impact on software use.
Defect Arrival Rate
Defect arrival rate tracks how many defects are reported over time during testing or after release. It helps teams understand when most defects appear and if the software is improving.
Defect arrival rate shows how defects are discovered over time.
Defect Resolution Time
Defect resolution time measures how long it takes to fix a defect from the moment it is reported. Shorter times mean faster problem solving and better team efficiency.
Defect resolution time tracks how quickly defects are fixed.
Defect Leakage
Defect leakage counts defects that were not found during testing but were discovered by users after release. It indicates gaps in the testing process.
Defect leakage reveals defects missed before software release.
Real World Analogy

Imagine a car factory checking cars for problems before selling them. They count how many cars have issues, how serious the issues are, how fast they find and fix problems, and if any problems are found after the cars are sold.

Defect Density → Number of cars with problems compared to total cars made
Defect Severity → How serious each car problem is, like a flat tire versus engine failure
Defect Arrival Rate → How many car problems are found each day during inspections
Defect Resolution Time → How long it takes mechanics to fix each car problem
Defect Leakage → Problems found by customers after buying the car that were missed in inspections
Diagram
Diagram
┌─────────────────────┐
│     Defect Metrics   │
├─────────┬───────────┤
│ Density │ Severity  │
├─────────┼───────────┤
│ Arrival │ Resolution│
│ Rate    │ Time      │
├─────────┴───────────┤
│      Leakage        │
└─────────────────────┘
This diagram shows the main defect metrics grouped together to measure software quality.
Key Facts
Defect DensityNumber of defects found per thousand lines of code.
Defect SeverityClassification of defects based on their impact on software.
Defect Arrival RateNumber of defects reported over a period of time.
Defect Resolution TimeTime taken to fix a defect after it is reported.
Defect LeakageDefects found by users after software release that were missed in testing.
Common Confusions
Believing defect density alone shows software quality.
Believing defect density alone shows software quality. Defect density must be combined with severity and resolution time to fully understand software quality.
Assuming all defects have the same impact.
Assuming all defects have the same impact. Defect severity shows that some defects cause bigger problems than others.
Thinking defect leakage means testing failed completely.
Thinking defect leakage means testing failed completely. Some defects are very hard to find before release; leakage highlights areas to improve testing, not total failure.
Summary
Defect metrics help teams measure and improve software quality by tracking problems found and fixed.
Key metrics include defect density, severity, arrival rate, resolution time, and leakage.
Understanding these metrics together gives a clear picture of software health and testing effectiveness.