Multiple condition coverage MCC

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 RequirementsCondition C1Condition C2
1TT
2TF
3FT
4FF
TRabConditionTest Case #
120     T30        Ta>10, b>201
220     T10        Fa>10, b>202
35       F30        Ta>10, b>203
45       F10        Fa>10, b>204
Test Case #Values input Pattern(a,b)
120,30
220,10
35,30
45,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 RequirementsCondition C1Condition C2Condition C3
1TTT
2TTF
3TFT
4TFF
5FTT
6FTF
7FFT
8FFF
TRabc TC
120       T30      T10        Ta>10

b>20

c<30

1
220       T30      T40        Fa>10

b>20

c<30

2
320       T10      F10        Ta>10

b>20

c<30

3
420       T10      F40        Fa>10

b>20

c<30

4
55         F30      T10        Ta>10

b>20

c<30

5
65         F30      T40        Fa>10

b>20

c<30

6
75         F10      F10        Ta>10

b>20

c<30

7
85         F10      F40        Fa>10

b>20

c<30

8

 

Test Case #Values input Pattern(a,b,C)
120,30,10
220,30,40
320,10,10
420,10,40
55,30,10
65,30,40
75,10,10
85,10,40

 

Subscribe for Friendship

Latest posts by Prof. Fazal Rehman Shamil (see all)

Buy advertisement space on T4Tutorials

For more details email [email protected]