Interview Questions

Given the following code, which statement is true about the minimum number of test cases required for full statement and branch coverage?

Software Testing Exam from The Information Systems Examinations Board (ISEB)


(Continued from previous question...)

Given the following code, which statement is true about the minimum number of test cases required for full statement and branch coverage?

Given the following code, which statement is true about the minimum number of test cases required for full statement and branch coverage?

Read p
Read q
IF p+q > 100 THEN
Print "Large"
ENDIF
IF p > 50 THEN
Print "p Large"
ENDIF

a) 1 test for statement coverage, 3 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage

Answer:

(Continued on next question...)

Other Interview Questions