How many test cases are necessary to cover all the possible
sequences of statements (paths) for the following program
fragment? Assume that the two conditions are independent of
each other : -
…………
if (Condition 1)
then statement 1
else statement 2
fi
if (Condition 2)
then statement 3
fi
…………
a. Test Cases
b. 3 Test Cases
c. 4 Test Cases
d. Not achievable


Plz. Explain in Detail...
Thank you.

Answer Posted / paulo

Yo can prepare a set of input values to go trough both
conditions, that would be one test case.
You can prepare another set of values to take the false path
in condition1 (the only one that have statement when false)
i.e:
If x > y then X=1
fi
If f > v then F=1
fi
Test case 1 would be X = 3, Y = 2, F=3, V=2
Test case 2, would be x= 3, Y = 4, F=3, F=4
So the answer would be 2 test cases, and as far as i can
see, that would be the option A, that have a missed number

Is This Answer Correct ?    55 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, Could anybody help me,by providing the ISTQB foundation level, materials or questions papers and patterns. What should I focus on..also plz tell me that how to prepare for this exam.. any reference books.. as i want to prepare it myself..plz reply.. my email-id is prameela.js@rediffmail.com or on prameela.js@gmail.com Thanks all in advance

1827


Hi Everybody, I am planning to write the ISTQB certification in Toronto. Can any one send the ISTQB foundation level book for 2013 exam?

2461


Is istqb is good certification is that job compulsory

2764


hi friends myself Naren,newly joined to this form i preparing for ISTQB certification can anybody help me on study material and sample question papers.......My email id is snarendranbsc@gmail.com Looking forward for your replies..... Thank u all in advance.....

1734


provide the best institute details in pune, which takes ISTQB preparation as well as exams to clear certification. send it on my mail id u_baride@yahoo.co.in

3093






Hi Friends, Do any one has ISTQB Foundation level dumps i am planning to give next month ( OCT, 2010 )Toronto,Canada. Please share with me on my E-Mail address: gauravsharma26@hotmail.com Thanks in Adavance

3089


Hi Friends, I planning to write my ISTQB Foundation level exam in August 30,2010.. Any one please send the Dumps for me.... My email-id is: onyxontesting@gmail.com Thanks in advance..

1964


hi all.... i have finished my testing course recently. i am planning to give an exam in istqb. can i get a good job in a good company after my certification exam finishes?

2507


Can anybody send me the dumps of ISQTB Exam. My Emal ID is kashive.kapil@gmail.com

2422


hi,I m preparing for istqb this month.I am getting difficulty to understand questions regarding statement coverage and branch coverage .can anybody help me to how to calculate statement coverage and branch coverage. Could anyone provide me questions on statement coverage and branch coverage and there solutions and also how to solve it?please do reply ASAP. Also could you provide me some dumb papers related to exam?

3060


Given the Following program IF X < Y THEN Statement 1; ELSE IF Y >= Z THEN Statement 2; END McCabe’s Cyclomatic Complexity is :

22334


Hi Friends, i am planning to give ISTQB Foundation level exam this month (20th September 2010),can anyone please send me the Dumps to my id?? lkokila8@gmail.com "Thanks in Adavance"

1843