What does statement coverage measure in white-box testing?

Prepare for the EC-Council Certified Ethical Hacker (CEH) v13 Exam with our comprehensive study resources. Ace your exam with flashcards and multiple-choice questions complete with hints and explanations. Get exam-ready now!

Multiple Choice

What does statement coverage measure in white-box testing?

Explanation:
Statement coverage measures whether every executable statement in the code has been executed by the test suite. By instrumenting the program or using a coverage tool, you track which statements actually run during tests and identify any statements that were never touched, helping to reveal dead code and gaps in test coverage. This focus on the basic building blocks of the code is different from performance metrics like how long the program runs, from function-level coverage that counts whether each function is invoked, or from network throughput, which is unrelated to code execution. So the idea is to ensure every executable statement is executed at least once.

Statement coverage measures whether every executable statement in the code has been executed by the test suite. By instrumenting the program or using a coverage tool, you track which statements actually run during tests and identify any statements that were never touched, helping to reveal dead code and gaps in test coverage. This focus on the basic building blocks of the code is different from performance metrics like how long the program runs, from function-level coverage that counts whether each function is invoked, or from network throughput, which is unrelated to code execution. So the idea is to ensure every executable statement is executed at least once.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy