Can anybody explain me branch/decision coverage with a
example.



Can anybody explain me branch/decision coverage with a example...

Answer / nitin

Branch Coverage reveals, if all branches were executed. (For example, an if-instruction has two branches, the then-branch and the else-branch.)
Decision Coverage reveals, if all decisions evaluated to both true and false. (For example, the decision of an if-instruction is what is between the parentheses.)

if (x > y)
print (x)
else if (x < y)
print (y)
else
print (x,y)

in the above example there are three decisions and 5 branches.
stmt 1 if two branches true or false
stmt 3 else if teo branches true or false
stmt 5 else one branch

so pass values like
x = 2,1,2
y = 1,2,2

so that all three decisions and 5 branches are covered.

Is This Answer Correct ?    14 Yes 4 No

Post New Answer

More Manual Testing Interview Questions

what is baseline in testing

12 Answers   IBM,


pliz anyone explain what is the DEFAULT BUG & also give me some example.Thanks in advance..

1 Answers   Amazon, Mindteck,


Have you ever created a test plan?

5 Answers  


How to write mail to bug report in manual testing with example?

2 Answers  


When did u complete testing ? Which scenrio should not be in automation testing ? why ?

0 Answers  


Can you explain regression testing and confirmation testing?

0 Answers  


what is android testing?

2 Answers  


what is e-tester?

0 Answers   IBM,


How to run the Data Base Testing Manually ?

1 Answers   Crea,


What is non-compliance testing?

1 Answers   Crea,


1> Which is the latest technology use for login page? 2> What is virtual keyboard? Is it more secure than key board?

1 Answers  


what the purpose of requirement phase

4 Answers  


Categories