Multiple condition coverage MCC

Also called condition combination coverage.

For each decision all the combinations of conditions should be evaluated.

MCC for 2 conditions:

Example code:

if(a>10     &&     b>20)

{
}

Test Requirements:

Total  test requirement are 22=4

Test Requirements Condition C1 Condition C2
1 T T
2 T F
3 F T
4 F F

 

Test Requirements a b Test Case #
1 20     T 30        T 1
2 20     T 10        F 2
3 5       F 30        T 3
4 5       F 10        F 4

 

 

Test Case # Values input Pattern(a,b)
1 20,30
2 20,10
3 5,30
4 5,10

 

 

MCC for 3 conditions:

if(a>10     &&     b>20    OR   c<30)

{
}

 

Test Requirements:

Total  test requirement are 23=8

Test Requirements Condition C1 Condition C2 Condition C3
1 T T T
2 T T F
3 T F T
4 T F F
5 F T T
6 F T F
7 F F T
8 F F F
Test Requirements a b c Test Case #
1 20       T 30      T 10        T 1
2 20       T 30      T 40        F 2
3 20       T 10      F 10        T 3
4 20       T 10      F 40        F 4
5 5         F 30      T 10        T 5
6 5         F 30      T 40        F 6
7 5         F 10      F 10        T 7
8 5         F 10      F 40        F 8

 

Test Case # Values input Pattern(a,b,C)
1 20,30,10
2 20,30,40
3 20,10,10
4 20,10,40
5 5,30,10
6 5,30,40
7 5,10,10
8 5,10,40