Multiple Condition Coverage (MCC) in software testing
According to Multiple Condition Coverage criteria, all combinations of True and False values of conditions must be covered.What are the conditions in software testing?
Conditions are atomic conditions in expressions.What are Decisions in software testing?
Decisions are the controls that can control the program flow after evaluating the full expression.
Example Code with 1 condition
1 2 3 4 5 6 |
If(a > 7) { } else { } |
Test Case ID | a > 7 |
1 | T |
2 | T |
Example Code with 2 conditions
1 2 3 4 5 6 |
If(a > 7 || b> 40) { } else { } |
Test Case ID | a > 7 | b> 40 |
1 | T | T |
2 | T | F |
3 | F | T |
4 | F | F |
Example Code with 3 conditions
1 2 3 4 5 6 |
If(a > 7 || b> 40 && C==0) { } else { } |
Test Requirements for Multiple Condition Coverage (MCC)
Test Case ID | a > 7 | b> 40 | C==0 |
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 |
- MCC= MCC stands for Multiple condition Coverage.
- MCDC= MCDC stands for Modified Condition Decision Coverage.
- CDC= CDC stands for Condition Decision Coverage.
- CC= CC stands for condition Coverage.
- DC= DC stands for Decision Coverage.