What does statement coverage measure in white-box testing?

Study for the EC-Council Certified Ethical Hacker Exam v13. Use flashcards and multiple choice questions with hints and explanations. Prepare for your certification exam today!

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