Multiple condition coverage MCC

By: Prof. Fazal Rehman Shamil
Last modified on August 12th, 2020

Multiple condition coverage (MCC) is also called condition combination coverage. For each decision all the combinations of conditions should be evaluated.

Multiple condition coverage (MCC) example

if(a>10     &&     b>20)

{
}

Test Requirements MCC

There are two conditions. So, total  test requirement will be 22=4 test requirements.

Test Requirements Condition C1 Condition C2
1 T T
2 T F
3 F T
4 F F
TR a b Condition Test Case #
1 20     T 30        T a>10, b>20 1
2 20     T 10        F a>10, b>20 2
3 5       F 30        T a>10, b>20 3
4 5       F 10        F a>10, b>20 4
Test Case # Values input Pattern(a,b)
1 20,30
2 20,10
3 5,30
4 5,10

Test Requirements MCC for three conditions

There are two conditions. So, total  test requirement will be 23=8 test requirements.

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
TR a b c   TC
1 20       T 30      T 10        T a>10

b>20

c<30

1
2 20       T 30      T 40        F a>10

b>20

c<30

2
3 20       T 10      F 10        T a>10

b>20

c<30

3
4 20       T 10      F 40        F a>10

b>20

c<30

4
5 5         F 30      T 10        T a>10

b>20

c<30

5
6 5         F 30      T 40        F a>10

b>20

c<30

6
7 5         F 10      F 10        T a>10

b>20

c<30

7
8 5         F 10      F 40        F a>10

b>20

c<30

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