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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Hi Friends,Can anybody Guides me about software testing ISTQB Fundamental certification exam?Friends who are certified Software Testing Professional guides me about its eligibility criteria,its syllabus,how to apply for the same.Mail me all these details on ikramtesting@gmail.com..I should be very thankful to u all.. Regards..
Need best book for ISTQB Certification or link from where I can download study material (question and answers)?
Hi..i am a New Joinee and is planning for ISTQB certification( Foudation level )can any one help me by providing with some Study Material at my ID remisnair@gmail.com... Thanks
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"
thanks a lot... i visited the link tat u had mentioned... i am a 2010 BE passed out i am looking for testing jobs so am a fresher.. but i saw in the link tat 24months of exp in testing is required to write the examination... pls suggest me that is tat possible for me to write the exam....
Hi, I am Gayathri.I worked in Wipro Technologies..Now due to recession am working in tcs bpo for the past 6 months...I want to move again to IT industry...I want to do istqb certification...I want to know the ISTQB training centres in chennai and also i want to know about the scope after finishing this ISTQB Certification...Pls send me the details about this to my e-mail id boobalan87@gmail.com.If you want to help pls do this help for me
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. Pls let me know from which site I can get sample question papers. My email-id is lal_cha_nd@yahoo.co.in Thanks all in advance. Mail Id: lal_cha_nd@yahoo.co.in
How should I prepare for ISTQB Foundation level Exam?What should I do as I am not having any idea about it?
Cuales son las preguntas que se hacen en este examen
Hi All, I am planning to give ISTQB Foundation level certification. If you have any materials/Q&Q, kindly forward to sandhyaach@gmail.com Thanks in advance, sandhya
Pls let me know the training centre of ISTQB Certification at KOLKATA- asitp2001@gmail.com
I would like to know the ISQTB centre in or around Pune (Maharashtra)