Site icon T4Tutorials.com

Multiple Condition Coverage (MCC) in software testing

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.

MCC Multiple Condition coverage

Example Code with 1 condition

If(a > 7)
{
}
else
{
}
Test Case ID a > 7
1 T
2 T

Example Code with 2 conditions

If(a > 7 || b> 40)
{
}
else
{
}

The total Test cases will be 2n. It means that if we have two conditions than n=2 so 22=4 test cases and if we have three conditions then 23= 8 test cases.

Test Case ID a > 7 b> 40
1 T T
2 T F
3 F T
4 F F

Example Code with 3 conditions

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

Some facts about Multiple Condition Coverage (MCC)

Exit mobile version