Last updated on:May 26th, 2018,

Decision Coverage criteria(DC) for software testing

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 D1Decision D2
TDon’t Care
FDon’t Care
Don’t CareT
Don’t CareF

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;

if(a*b>50)

cout<<”welcome to T4Tutorials.com”<<endl;

}

else

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 D1Decision D2
1TDon’t Care
2FDon’t Care
3Don’t CareT
4Don’t CareF

Now, We can generate test cases from these test requirements.

TC#Test CaseD1D2T.R met
1(7,8)TT1, 3
2(8,7)F2
3(4,5)TF1,4

 

Some facts about Decision Coverage criteria (CC)

  1. DC ensures that all conditions must have at least one T and one F value.
  2. DC is weaker than CDC.
  3. DC is weaker than MCDC.
  4. DC is weaker than MCC.

 

0Shares

Leave a Reply

Your email address will not be published.