The following statement refers to decision coverage: “When the code contains only a single ‘if’ statement and no loops or CASE statements, and its execution is not nested within the test, any single test case we run will result in 50% decision coverage.” Which of the following statement is correct?

Các đáp án

A.The statement is true. Any single test case provides 100% statement coverage and therefore 50% decision coverage.
B.The statement is true. Any single test case would cause the outcome of the “if” statement to be either true or false.
C.The statement is false. A single test case can only guarantee 25% decision coverage in this case.
D.The statement is false. The statement is too broad. It may be correct or not, depending on the tested software.

Đáp án đúng

B: The statement is true. Any single test case would cause the outcome of the “if” statement to be either true or false.

Câu hỏi khác trong đề thi này