sumit
Answered On : Jan 23rd, 2007
option -b
Login to rate this answer.
I think its option d
Login to rate this answer.
Answer is B since we need minimum number of test cases..
For Branch Coverage: As we have two If statements, we need 2 test cases.
One to test If P+Q>100 and another for If P>50.
Login to rate this answer.
tara
Answered On : Aug 9th, 2007
hi,
i have just read the question.
some of our friends saying that we require only one testcase for statement coverage.
this is ok for positive testing.for the negative testing we need one more test case.
example:if they are numbers it is ok.but when we give other other than numbers it must give some error message.
and also i think for black box testing we need 2 test cases for statement coverage for this example/code.as this is white box testing do we need only one statement coverage.
my answer is option e
if my answer is wrong please let me know.
Tara.
Login to rate this answer.
ans is B... n tis is a ISTQB question... :) am i rite ?

1 User has rated as useful.
Login to rate this answer.
option - b) is the correct answer.
1) if p = 51, Q= 50 it will cover all the statements. so, one test for statement coverage.
2) for branch coverage:
a) P+Q> 100 AND P>50 (True)
b) P+Q < 100 AND P<50 (False)
a) & b) will cover both the branch conditions
yes, it is an ISTQB question.

1 User has rated as useful.
Login to rate this answer.
Answer: B) 1 test for statement coverage, 2 for branch coverage
Login to rate this answer.