CTAL-TTA_001 · Question #21
Part 1 "Test Techniques various" If we say that a set of tests has achieved 100% structural decision coverage on a particular module in a program, what does that mean? 1 credit [K2]
The correct answer is B. That every control flow branch had been executed at least once by those tests. 100% structural decision coverage (also called branch coverage) means every decision point (if/else, switch, loop condition) in the module has been evaluated to both true and false outcomes, ensuring every branch has been traversed at least once - making B correct. A is wrong…
Question
Part 1 "Test Techniques various" If we say that a set of tests has achieved 100% structural decision coverage on a particular module in a program, what does that mean? 1 credit [K2]
Options
- AThat all bugs present in that module were necessarily revealed by those tests.
- BThat every control flow branch had been executed at least once by those tests.
- CThat every dataflow in that module was exercised at least once by those tests.
- DThat every path through that module was exercised at least once by those tests.
How the community answered
(65 responses)- A2% (1)
- B94% (61)
- C3% (2)
- D2% (1)
Explanation
100% structural decision coverage (also called branch coverage) means every decision point (if/else, switch, loop condition) in the module has been evaluated to both true and false outcomes, ensuring every branch has been traversed at least once - making B correct.
- A is wrong because coverage metrics never guarantee all bugs are found; tests can execute code without detecting every defect.
- C is wrong because dataflow coverage tracks how data is defined and used - that's a separate technique (def-use coverage), not decision coverage.
- D is wrong because covering every path through a module is path coverage, a much stronger (and often impractical) criterion - the number of paths can be exponentially larger than the number of branches.
Memory tip: Think of a decision as a fork in a road - decision coverage just means you've driven down each fork at least once, not that you've taken every possible combination of turns (paths) or checked what happened to your cargo along the way (dataflow).
Topics
Community Discussion
No community discussion yet for this question.