nerdexam
ISTQB

ISTQB-CTFL · Question #60

Why is measurement of code coverage Important?

The correct answer is A. Because 100% code coverage implies 100% coverage of requirements. There appears to be an error in the provided answer key - A is actually a distractor, not the correct answer. The correct answer is C. Here's why: C is correct because code coverage's primary purpose is to measure which code paths are exercised during testing, helping teams…

Test Techniques

Question

Why is measurement of code coverage Important?

Options

  • ABecause 100% code coverage implies 100% coverage of requirements
  • BBecause 100% code coverage guarantees that there are no coding errors
  • CBecause code coverage can be used to ensure that all code is exercised by tests
  • DBecause code coverage can ensure that all decisions are correctly implemented in the code

How the community answered

(57 responses)
  • A
    70% (40)
  • B
    18% (10)
  • C
    4% (2)
  • D
    9% (5)

Explanation

There appears to be an error in the provided answer key - A is actually a distractor, not the correct answer. The correct answer is C.

Here's why:

C is correct because code coverage's primary purpose is to measure which code paths are exercised during testing, helping teams identify untested code. It answers the question: "Did our tests actually run this code?"

A is wrong (and a classic trap answer) because 100% code coverage does not imply 100% requirements coverage. You can execute every line of code while missing entire business requirements - coverage tools have no awareness of what the software is supposed to do.

B is wrong because coverage only tells you code was executed, not that it executed correctly. A test can run a buggy function and still count it as "covered."

D is wrong because coverage confirms code was run, not that decisions (conditionals, branches) are correctly implemented. A flawed if statement can still be "covered."

Memory tip: Think of code coverage like a GPS tracking which roads were driven - it proves the roads exist and were traveled, but says nothing about whether you reached the right destination (requirements) or drove safely (no bugs).

Note for your exam prep: If this came from an official practice test, double-check the source. Choosing A on this question would be incorrect per standard software testing principles (ISTQB and similar).

Topics

#code coverage#structural coverage#test measurement

Community Discussion

No community discussion yet for this question.

Full ISTQB-CTFL Practice