Hi, Below is a question on white box testing. Kindly help
me in answering it. How many test cases are needed to
obtain 100% branch coverage. This question was asked in
ISTQB foudation level exam - Dec21 2008.

Read(A,C)

If(A<10) then Print A;

Endif

If(C>100) then Print C is greater then A

else if(C<100) then print only C

Endif else

Options -
a. 4
b. 3
c. 2
d. 1

Kindly answer with explanation so that it would be easy to
understand

Answer Posted / varshab

Ans is 4 as there are two branches.For these two branches
we need to test for both true & false conditions. hence to
achieve 100% branch coverage we need to write 4 test cases.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the term ‘quality’ mean when testing?

774


Write test cases on duster

4238


Once automated, what are the types of functionality provides the highest Return On Investment (ROI) to the company?

10444


PLS SEND REAL TIMERS, WHAT IS SOA TESTING..IM TRYING 3+ YR.. I HAVE GOOD KNOWLEDGE ON MANUAL TESTING... NOW IM NEW TO LEARN "SOA TESTING" IS BEST OR NOT? BEFORE LEARNING SOA TESTING ANY SKILLS ARE REQUIRED..... AND NOW WHAT IS THE MARKET FOR SOA TESTING... AND IT IS BASED ON PROGRAMMING OR NOT?

2326


How to test a Falsh player scrollings?

1761






Relative to other technical groups in the company? Relative to your staff?

1508


hai friends i need a general test cases for check box,drop down button and radio butoon can anybody reply me plz..........thanks in advance

1558


I studied MBA, I want learn any softwarecourse, which course is better hadoop or testing tools(manual+selenium?)

1206


Tell some examples of bug severity and bug priority?

631


What are the RBI rules has to follow by a bank for online precesseing. ?

1717


what are the advantages of manual and automation testing ? and which one would u term as efficent testing and effective testing ?pls do reply thankx in advance

1439


Do you use any automation tool for smoke testing?

782


What is concurrent user hits in load testing?

824


What is early testing?

669


I am having 2 years of experience in Manual Testing, 2marrow I have an interview with a Company. Which type of questions they will ask me?How should I prepare for interview?Please guide me so that I will clear the interview.

1750