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.

Answers were Sorted based on User's Feedback



How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / 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 ?    54 Yes 17 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / madhavi

we prepare 4 test cases for path coverage for this question.why becoz we have to find out number of possible ways for path coverage.

Is This Answer Correct ?    28 Yes 4 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / nithya

Path Coverage ensures covering of all the paths from start to end.
So the correct answer is 4 test cases.

Is This Answer Correct ?    12 Yes 2 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / jagadish

for path coverage we have to check all the paths its like
boolean expression, (true, true) is one path, (true, false)
is the second path, (false, true) is third path and both
false is the fourth path. so to cover 100% path coverage it
needs 4 test cases to achieve it. Please clarify if i am wrong.

Is This Answer Correct ?    22 Yes 14 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / anand

It is 4 test cases for the path coverage. The first condition has two path Statement 1 and Statement 2 (True and False). Same way the second condition also has two paths Statement 3 and nothing/null ( as there is no else for the second condition ) but it still is path (there is no statement but still there is a path compiler can take...)

Is This Answer Correct ?    5 Yes 2 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / mandokar

It requires only 2 test cases as in the question he
mentioned "path", if it was condition then the answer could
have been 4 as jagdish said.

Is This Answer Correct ?    5 Yes 5 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / sachin karla

actually in statement testing,what happens like,3 cases arise in the program and it proceeds as:
case 1:the '+' sign becomes a 'space'.
case 2:'%xx' becomes byte with hexadecimal value 'xx'.
case 3:other alphanumeric char map themselves.
So guys,think about it and make a proper testing over it..

Is This Answer Correct ?    1 Yes 1 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / hayk grigoryan

TC1 c1 true, c2 true, TC2 c1 true, c2 false, TC3 c1 false, c2 true

Is This Answer Correct ?    0 Yes 0 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / babu

3 Test Cases.

Is This Answer Correct ?    19 Yes 20 No

How many test cases are necessary to cover all the possible sequences of statements (paths) for th..

Answer / anwar sayed

If its dependent there would be 4 cases
and if it is dependent it would be 3 test cases

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More ISTQB Certification Interview Questions

Hi, Could anybody help me,by providing the ISTQB foundation level, materials or qusetions papers and patterns. What should I focus on, as i'm taking the certifiaction exam in March. Which site can I find sample question and materials. My email-id is lal_cha_nd@yahoo.co.inThanks all in advance. Any one Send me the Question and Answers for ISTQB Foundation Level Exam Prepration

0 Answers  


pls anyone send me istqb materialfor foundation level as iam preparing for it to my email id varalakshmi.kakara@gmail.com

0 Answers  


Hi, I am from kolkata.I want to appear for ISTQB foundation level exam.Any body reply me,who has already appeared for the same from kolkata....waiting for ur reply friends.....

2 Answers  


i have done BCS in 2008 & i'm working in BPO.I have relavant exp of BPO.Now i m going to give the ISTQB test.I dont understand it will give me a job in testing or not. But just last try.So r dey gonna ask me...tht i have huge gap in education.

1 Answers  


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"

0 Answers  






Any company is asking for istqb certified tester.What is its value in the software field.pl let me know.i want to appear for that exam

11 Answers  


Hello all I am Ila.... I am appearing for ISTQB foundation level certification in May.. Please can any1 provide me material for preparation & on what part I should focus more so as to clear exam.. I'll b thankful.. Plese help me out.. You can mail me at ilapathak@rediffmail.com

2 Answers  


I am preparing for ISTQB,can any one send the sample question papers to my mail id.My id is rsaarthiblue@yahoo.co.in

0 Answers  


Hello. Could anyone send me any materials you have on taking the ISTQB exam - questions/scenarios/answers, etc.? I'm scheduled to take the exam in June 2009 and any help would be greatly appreicated. My email is lesleyjordan67@yahoo.com Thank you!!!!

2 Answers  


Hi, I am planning to take ISTQB foundation level examination.Can anyone please forward the materials which cover the foundation level syllabus.My email: latha2smart@gmail.com Thanks, Latha.

1 Answers   Fast Track, NetLink,


What is difference between iseb and istqb and which one whould be better to take.

4 Answers  


I want to go for the ISTQB testing?? Please anyone tell me details for this??? Please share with me on my E-Mail address: mailmevarun988@yahoo.in

1 Answers  


Categories
  • Cisco Certifications Interview Questions Cisco Certifications (2321)
  • Microsoft Certifications Interview Questions Microsoft Certifications (171)
  • Sun Certifications Interview Questions Sun Certifications (45)
  • CISA Certification Interview Questions CISA Certification (744)
  • Oracle Certifications Interview Questions Oracle Certifications (64)
  • ISTQB Certification Interview Questions ISTQB Certification (109)
  • Certifications AllOther Interview Questions Certifications AllOther (295)