ISTQB Certified Tester Foundation Level v4.0 — Question 26
When tests are being created to achieve statement coverage, what are they exercising?
Answer options
- A. Only the decisions in the code
- B. Only the loops in the code
- C. Only the executable statements in the code
- D. All lines of code including executable statements and comments
Correct answer: C
Explanation
Statement coverage ensures that every executable statement in the code has been executed at least once during testing. This means that options A and B, which focus solely on decisions and loops respectively, do not cover the full scope of statement coverage, while option D incorrectly includes comments, which do not affect execution.