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

write a use case format for login

1 Answers  


Wht are the Test cases do we write for Message Box.. can anybody answer it.. Thanks in Advance..

3 Answers   ACS,


Hi frnds, can any one tell me what are d real role & responsibility of an tester ? to be a GOOD TESTER, what we have to do ??

5 Answers   Valtech,


what type of diffects we can find while preparing the test plan

3 Answers   G S Lab, Patni, Saba,


What is the need of smoke test even when unit test is done by developers?

6 Answers  






Wht is Testing Frame work.Is it same in the Manual and Automation testing. can body can explain it

1 Answers  


Hi this is sridhar,iam working in a small organization and i have 1 year exp in manual testing,which type of questions will ask if i keep 1+exp in other companies.pls send your valuable suggestions for me.And my e-mail id is sridharraghava@gmail.com ne

1 Answers  


At first time when you receive the application at that time which testing you do?

1 Answers  


If anyone have attended interview with deloitte for the post of senior manual test engineer. Please share the interview process and the questions asked. How to prepare for the interview. Thanks in advance

0 Answers  


how will u Do Smoke testing and Sanity testing for these fields:We have 3 fields on page: Name,Address and Pincode ?

6 Answers   HCL,


What is Check list for review test cases ?

1 Answers  


What is the example of Integration Testing?

11 Answers   Object Orb, SQL,


Categories