Interview Questions

Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage:Read PRead QIF P+Q > 100 THENPrint “Large”ENDIFIf P > 50 THENPrint “P Large”ENDIF

Software Testing Exam from International Software Testing Qualifications Board (ISTQB)


(Continued from previous question...)

Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage:Read PRead QIF P+Q > 100 THENPrint “Large”ENDIFIf P > 50 THENPrint “P Large”ENDIF

Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage:Read PRead QIF P+Q > 100 THENPrint “Large”ENDIFIf P > 50 THENPrint “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, 3 for branch coverage
e) 2 tests for statement coverage, 2 for branch coverage

Answer:

(Continued on next question...)

Other Interview Questions