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 ?    55 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

Maintenance testing is: 1. updating tests when the software has changed 2. updating tests when the software has changed 3. testing by users to ensure that the system meets a business need 4. testing to maintain business advantage

2 Answers   ISTQB, Tech Mahindra,


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  


Hi friends!this is yuva..I want to prepare for ISTQB Exams.I need materials and details, Sample Questions every thing..plz help me friends...send me..yuvaranirajendran@gmail.com..thank uuuuuuuuuuu

1 Answers  


Hi ...Can anybody provide me ISTQB foundation level materials and question papers ? and please let me know how to prepare for this exam .... I will be really thankfull to u :) My id is deeptinamdeo@gmail.com

1 Answers  


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

4 Answers  






Hi I want to do ISTQB foundation level certification.Can anyone pls tell where can i register for this and get the study material for this? Thnx. Neha

7 Answers   IBM,


could anybody provide me the name of ISTQB certification (foundation) book which is in brief cover all topics or please provide me questions & answers of previous ISTQB papers.

1 Answers   IBM,


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.

12 Answers   Idea, TATA,


Hi, Iam geetha, i want your suggestion, which istqb books will be useful for the certification exam, plz guide me, iam planning to write the certification exam thanks in advance

2 Answers  


CAN ANY OF YOU SEND ME THE DETAILS OF QTP CERTIFICATION.HOW TO APPLY FOR IT? WHERE TO GET THE MATERIALS? IF ANF ONE OF YOU KNOW THIS DEATILS PLS MAIL TO MY ID mohan_vivvek@yahoo.co.in or asha_muruga@yahoo.co.in

1 Answers   Satyam,


What test techniques does component test strategy stipulate? What percentage of decision coverage is required? What should be done if errors are found? The project component test plan is useful because the approach outlined allows: a) Strict adherence to the component test strategy b) More faults to be identified in the LOG components c) A basic working systems to be established as early as possible d) Isolation of the components within the test strategy The component test plan must consist of a single document? TRUE/FALSE The component test plan must specify test completion criteria? TRUE/FALSE Why does component test plan specify 100% DC whereas strategy required 90%? Which test case deals with non-numeric input? List the expected outcome and the test condition Why does the CTP have additional/altered test cases? What action has been taken as a result of the test report?

3 Answers   IBM,


Is Alpha test and Beta test a pre-delivery or post-delivery activity?

6 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)