199k views
4 votes
Which statement about the relationship between statement coverage and decision coverage istrue?

A. 100% decision coverage also guarantees 100% statement coverage
B. 100% statement coverage also guarantees 100% decision coverage
C. 50% decision coverage also guarantees 50% statement coverage
D. Decision coverage can never reach 100%

1 Answer

5 votes

Final answer:

Statement coverage and decision coverage are metrics used in software testing, and 100% statement coverage guarantees 100% decision coverage.

Step-by-step explanation:

Statement coverage and decision coverage are two metrics used in software testing to assess the effectiveness of test cases. Statement coverage measures the percentage of code statements that are executed during testing, while decision coverage measures the percentage of decision outcomes that are tested.

The correct statement about the relationship between statement coverage and decision coverage is option B: 100% statement coverage also guarantees 100% decision coverage. This is because every decision point in the code is covered when all the code statements are executed. However, the reverse is not always true. Achieving 100% decision coverage does not necessarily ensure that every single code statement has been executed.

User AmmarCSE
by
7.6k points