Skip to content
← All CTFL glossary terms

Defect density

The number of defects per unit size of a work product (e.g. per thousand lines of code), used to compare quality across components.

Syllabus chapters: 5

Sources: ISTQB® Certified Tester Foundation Level syllabus 4.0.1 and the official ISTQB® Glossary. Glossary content © International Software Testing Qualifications Board; source: glossary.istqb.org.

Related terms

Defect density in a practice question

Question 1

Which of the following is an example of a defect metric used in testing?

  1. Defect density and defect detection percentage
  2. The number of test cases run and not yet run
  3. The product's mean time to failure value
  4. The cost of testing and the cost of quality
Show answer
  • Correct answer: Defect density and defect detection percentageDefect density and defect detection percentage are defect metrics.
  • The number of test cases run and not yet runTest cases run and not run is a test progress metric, not a defect metric.
  • The product's mean time to failure valueMean time to failure is a product quality metric, not a defect metric.
  • The cost of testing and the cost of qualityCost of testing and cost of quality are cost metrics, not defect metrics.

Defect metrics include the number and priorities of defects found and fixed, defect density, and the defect detection percentage. The other options are, respectively, test progress metrics, product quality metrics, and cost metrics.

Syllabus section 5.3.1

Question 2

A test manager wants a metric showing how far the executed tests reach into the requirements and into the code. Which metric category provides this?

  1. Defect metrics, such as defect density and defect detection percentage
  2. Product quality metrics, such as availability and response time
  3. Test progress metrics, such as the number of test cases run and passed
  4. Coverage metrics, such as requirements coverage and code coverage
Show answer
  • Defect metrics, such as defect density and defect detection percentageDefect metrics count and classify defects; they say nothing about how far the tests reach.
  • Product quality metrics, such as availability and response timeProduct quality metrics describe the test object's behaviour, such as availability or response time.
  • Test progress metrics, such as the number of test cases run and passedTest progress metrics track how much of the planned test work has been carried out.
  • Correct answer: Coverage metrics, such as requirements coverage and code coverageRequirements coverage and code coverage are the listed coverage metrics.

Test metrics are gathered to show progress against the planned schedule and budget, the current quality of the test object, and the effectiveness of the test activities. Among the common test metrics, coverage metrics are the ones expressed as requirements coverage and code coverage, which is exactly what a reach-into-requirements-and-code measure needs.

Syllabus section 5.3.1

Original PrepBench practice material, not official exam questions or exam dumps. PrepBench is independent and is not affiliated with or endorsed by ISTQB®.