Multiple choice technology testing

Statement Coverage will not check for the following.

  1. Missing Statements

  2. Unused Branches

  3. Dead Code

  4. Unused Statement

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Statement Coverage only verifies that each statement has been executed at least once. It does not detect missing statements that should exist but were never written - this requires requirements or specification review. Unused branches, dead code, and unused statements are all present in the code and would be detected by statement coverage (or lack thereof). Missing code is fundamentally invisible to coverage tools.

AI explanation

To answer this question, we need to understand the concept of statement coverage.

Statement coverage is a metric used in software testing to measure the percentage of statements in a program that have been executed during testing. It helps identify areas of a program that have not been tested.

Let's go through each option to understand why it is correct or incorrect:

Option A) Missing Statements - This option is incorrect. Statement coverage does check for missing statements. It ensures that all statements in the code have been executed at least once during testing.

Option B) Unused Branches - This option is incorrect. Statement coverage does check for unused branches. It ensures that all branches in the code have been taken at least once during testing.

Option C) Dead Code - This option is incorrect. Statement coverage does check for dead code. Dead code refers to the parts of the code that can never be executed. Statement coverage helps identify such code by ensuring that all statements are executed.

Option D) Unused Statement - This option is correct. Statement coverage does not specifically check for unused statements. However, by ensuring that all statements are executed, it indirectly helps identify unused statements.

The correct answer is A) Missing Statements. This option is incorrect because statement coverage does check for missing statements.