Condition Coverage criteria(CC) for software testing
According to Condition Coverage (CC) criteria, every condition must be covered. It means that each condition must have at least one True and one False value. Condition coverage and decision coverage have no subsumption relationship.
|Condition C1||Condition C2|
Table 1: C1 and C2 both have at least one T and one F value.
|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;
If all test requirements were met, then we can say that we have correctly performed CC criteria.
|1||T||Don’t care||Don’t care|
|2||F||Don’t care||Don’t care|
|3||Don’t care||T||Don’t care|
|4||Don’t care||F||Don’t care|
|5||Don’t care||Don’t care||T|
|6||Don’t care||Don’t care||F|
Now, we can generate test cases from these test requirements.
|TC#||Test Case||C1||C2||C3||T.R met|
|1||(7,8)||T||T||T||1, 3, 5|
Some facts about Condition Coverage criteria (CC).
CC ensures that all conditions must have at least one T and one F value.
CC is weaker than CDC.
CC is weaker than MCDC.
CC is weaker than MCC.