I have seen the following question in an ISTQB - Foundation Level sample paper.
Q. 12: If the pseudo code below were a programming language ,how many tests are required to achieve 100% statement coverage?
- If x=3 then
- If y=2 then
I believe that the answer is 2 because you can cover all the Statements by covering the following paths.
However, many web sites (please find a list of sites at the end) say that the answer is 3.
I have two questions :
- Is there anything wrong with my flowchart?
- Why is my answer incorrect?
Links to the places where it says that 3 is the correct answer