RE: Minimum number of testcase required for 100% statement coverage
If the pseudocode below were a programming language ,how many tests are
required to achieve 100% statement coverage?
1. If x=3 then
3. If y=2 then
According to me the answer should be 2 testcases
please assist with the correct answer
Well, you have the same result for Else condition for the second If, I would say that last Else Display_messageZ is unecessary and step 7 and 8 should be ignored. for Step 1 should be two test cases for when x value is 3 and when is not 3. For step 3, should be 1 test case for when y is 2 and another test case for when is different than two and should Display_messageZ. I would go with 4 Test cases to test this functionality.