|
Re: ISTQB Questions Papers
Rakesh,
First lets identify the number of branches in the code.. i think True and false are 2 branches.
As you said, P = 60 and Q = 50 checks only the True conditions of both the IF statements.This is only 50% coverage.
So what happens to false condition? that branch is not tested.
That is when P = 55, Q = 40 satisfies the false condition of both the If statements.
So, when P = 55, Q = 40 we can check if the system skips the PRINT statements thereby comlpeting the entire baranches (100% branch coverage!) So we need 2 test cases for branch coverage and one for statement coverage.
Is the explanation OK?? Any inputs?
__________________
Regards,
Rama
" Failure is the oppurtunity to begin again, more Intelligently! "
|