Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



Hi, Below is a question on white box testing. Kindly help me in answering it. How many test cases ..

Answer / rama mohan parini

Require 3 Path test cases.

Test Case 1 - A is any value > 9 and C = 100 to check that
nothing is printed.

Test Case 2 - A is any value < 10 and C is > 100 to check
that Print A and
Print C is greater than A lines are printed

Test Case 3 - A is any value, and C is < 100 to check that
Print A ( only if A is < 10)
Print C is greater than A is printed.

We should use Cyclomatic complexity formula to calculate
number of paths easily

C = E - N + 2

Is This Answer Correct ?    4 Yes 2 No

Hi, Below is a question on white box testing. Kindly help me in answering it. How many test cases ..

Answer / hima bindu

Number of testcases required for branch coverage will be 2.

In branch coverage we need to check whether all the
branches are exercised.
Here we have 3 branches all If statements we need to
consider.They are A<10,C>100,C<100

Line 1 - Read(A,C)
Line 2 - If(A<10) then
Line 3 - Print A;
Line 4 - Endif
Line 5 - If(C>100)then
Line 6 - Print C is greater then A
Line 7 - else if(C<100) then
Line 8 - print C
Line 9 - End if

So take the values as follows
Testcase 1 : A=5 and C=120
For this set of values Line1 - Line6 are executed

Now for the Line7 - Line9 to be executed take the value of
c as less than 100
So Testcase 2 : A=5(can be any value as Line 2,3,4 are
already exercised in testcase1)and c=80
For this set of values Line7-Line9 will be exercised

Is This Answer Correct ?    2 Yes 2 No

Hi, Below is a question on white box testing. Kindly help me in answering it. How many test cases ..

Answer / madhu

3 cases would be required
as we need to exercise both positive and negative scenarios
of the 2 branches

Is This Answer Correct ?    0 Yes 0 No

Hi, Below is a question on white box testing. Kindly help me in answering it. How many test cases ..

Answer / ravo

two tests are required

Is This Answer Correct ?    1 Yes 3 No

Hi, Below is a question on white box testing. Kindly help me in answering it. How many test cases ..

Answer / kajal

answer is a.4

1 test case to check if system can read a and c
2 to check if a<10
3 to check if c is > 100 and < 100
to check if a and c are printed

Is This Answer Correct ?    2 Yes 5 No

Hi, Below is a question on white box testing. Kindly help me in answering it. How many test cases ..

Answer / 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

More Manual Testing Interview Questions

After insert the record in forntend, How will u check the backend by manually? Please explain..

4 Answers  


Write test cases on Travel bag?

3 Answers   Mastek,


what is the call-pair testing? there is any length for Test case?

5 Answers   Blesso Soft,


what is test initiation? can anybody post the answer. very urgent?

6 Answers   Accenture, Maveric,


What is the difference between functional testing and behavioral testing?

4 Answers   TCS,


How many Test Cases do we need to write for a particular application?(For example, for this AllInterview.com?)

4 Answers   InterGraph,


Hi,all i have a desktop App. which have a feature, It's a demo version if u want full version then u have to perches it. Pls give me some idea ASAP how can i break the App.

0 Answers  


What is Dynamic Binding and Dynamic Loss?

0 Answers   Digient Technologies,


i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?

0 Answers  


How to calculate testing productivity?

0 Answers  


What is the first query u encounter to test a database..?

2 Answers   HCL,


what is visible state transaction test? give one example

0 Answers  


Categories