Question 1
A project is using an automated test framework that generates code coverage reports after each nightly build. The team observes that while statement coverage is consistently high (above 95%), decision coverage is much lower (around 60%). Which of the following is the MOST likely cause for this discrepancy?
Answer and explanation
Correct answer: B
High statement coverage with low decision coverage is a classic indicator of insufficient test data variety. It means the tests are executing the lines containing the 'if' statements but are not providing the necessary inputs to cause both the 'true' and 'false' branches to be taken. To increase decision coverage, the team needs to add test cases that exercise the untested branches of the conditional logic.
