Decision Coverage criteria(DC) for software testing
According to Decision Coverage criteria(DC) criteria, every decision must be covered. It means that each decision must have at least one True and one False value. Decision coverage and condition coverage have no subsumption relationship.
|Decision D1||Decision D2|
Table 1: D1 and D2 both have at least one T and one F value.
Programming example of decision coverage criteria
|void main (int a, int b)
if(a<b && a+b<20)
Cout<<”welcome to our tutorials website”<<endl;
cout<<”welcome to T4Tutorials.com”<<endl;
cout<<”Thank you for your time on our website”<<endl;
Test Requirements for decision coverage criteria:
If all test requirements were met, then we can say that we have correctly performed DC criteria.
|TR#||Decision D1||Decision D2|
Now, We can generate test cases from these test requirements.
|TC#||Test Case||D1||D2||T.R met|
Some facts about Decision Coverage criteria (CC)
- DC ensures that all conditions must have at least one T and one F value.
- DC is weaker than CDC.
- DC is weaker than MCDC.
- DC is weaker than MCC.