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 |
What is the STLC process in your company?
What is system testing? when we use system testing in our project?
What is Integration Testing?What is Bottom Up & Top Down Testing? What actually the Stub & Driver is? Explain me giving practical example?
what is alpha , beta testing ?
What is Reliability Testing
3 Answers FactSet Systems, Genpact,
What are the cases why parameterization is necessary when load testing the Web server and the database server?
How do you go about testing a project?
How a test engineer will convince a test lead when he didn't approve the bug as a report ???
Test cases for Equity,Bond,Futures and options financial instruments
What is difference between web application and non-web applications?
2. What resources do you use to learn about Web accessibility?
What techniques will cause double-byte problems to show up?