Can anybody explain me branch/decision coverage with a
example.
Answer Posted / 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 View All Answers
What is the Difference between Network testing and Web Testing?
Can anyone please answer the below question on Manual Testing: Tell me about atleast 5 bugs you come across in your last testing?
what are all the possible Test Cases for VoIP based applications
What is the different between SIT and UIT?
There are some features to improve the performance of a Product. What are those factors?
1.what is the approach while writing test cases in your project. 2.tell some intresting scenareo in your project
Explain stub in testing point of view?
what is entry and exit criteria and explain it?
What is localization testing (l10n testing)?
Test cases have written according to Flow of the software working or according to Screens?
What is Traditional testing & Object Oriented testing?
What is neutral test case?
from where do u collect test data if u miss some data what will happen
What are the bugs we cannot find in black box?
Relative to other technical groups in the company? Relative to your staff?