SOFTWARE ENGINEERING

SOFTWARE TESTING

TEST PLAN AND TEST CASE DEVELOPMENT

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Consider the following statements:i. 100% statement coverage guarantees 100% branch coverage.ii. 100% branch coverage guarantees 100% statement coverage.iii. 100% branch coverage guarantees 100% decision coverage.iv. 100% decision coverage guarantees 100% branch coverage.v. 100% statement coverage guarantees 100% decision coverage.
A
ii is True; i, iii, iv & v are False
B
i & v are True; ii, iii & iv are False
C
ii & iii are True; i, iv & v are False
D
ii, iii & iv are True; i & v are False
Explanation: 

Detailed explanation-1: -In statement coverage testing, 100% statement coverage is said to be achieved if all the statements are tested at least once. This type of testing is usually performed by the developers using development tools.

Detailed explanation-2: -4 test cases are required for 100% decision coverage.

Detailed explanation-3: -To achieve 100% statement coverage of this code segment just one test case is required, one which ensures that variable A contains a value that is greater than the value of variable Y, for example, X = 12 and Y = 10.

There is 1 question to complete.