Find statement coverage and branch coverage:
1) Read P
Read Q
if P+Q>100
then print "Plarge"
endif

2. Disc=0
order_qty=0
Read order_qty
if order_qty>=20
Disc=0.05
if order_qty>=100 then
Disc=0.1
endif
endif

Answers were Sorted based on User's Feedback



Find statement coverage and branch coverage: 1) Read P Read Q if P+Q>100 then print ..

Answer / kshama

Hi Nitin,

can you please elaborate ur answer.I am not getting it as
because i don't know how to find statement coverage and
condition coverage. and kindly explain me what all
conditions needs to be keep in mind while find statement
coverage and condition coverage.

Thanks & Regards,
Kshama

Is This Answer Correct ?    2 Yes 1 No

Find statement coverage and branch coverage: 1) Read P Read Q if P+Q>100 then print ..

Answer / nitin

for 1) - For stmnt. coverage we would require only 2 test
case to execute all the stmnts. in section 1.

for 2) For branch coverage we would require 3 test cases.
B'coz for every if condition we need to execute true and
false. So, false condition can be executed in a one go for
both IF condition and 2 test case would be required to
execute true for both IF condition.

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More Manual Testing Interview Questions

How we map test cases with the requirement in Quality Center plzzz give the procedure step by step

2 Answers  


On which module did u involve in your project..?

1 Answers   HCL,


can any one explain the example of high servity and low priority, low servity and high priority, high servity and high priority, low servity and low priority

4 Answers   Intact Solutions,


what is bug life cycle? (Asked in Zensar Hyderabad today(17-1-12010))

5 Answers   Zensar,


what are the 508 rules of accessbility Testing ?

1 Answers  






the typical Application Test Lifecycle?

1 Answers  


Explain Vmodel

3 Answers   Infosys,


what is crud testing ?

1 Answers   Crea,


what is bug life cycle?

9 Answers   Cap Gemini,


How and what to functionally test in a web based application manually?

3 Answers  


Give proper Seq. to following testing Types Regression, Retesting, Funtional, Sanity and Performance Testing.? and which phase of STLC comes?

1 Answers  


I need a good book on manual testing.Is the book by nageswara rao good.I need to learn from basic to advanced.

1 Answers  


Categories