Multiple Condition Decision Coverage

Multiple Condition Decision Coverage

Multiple Condition Decision Coverage(MCDC) is also known as Modified Condition Decision Coverage.

In MCDC each condition should be evaluated at least once which affects the decision outcome independently.

Example for MCDC

if {(X or Y) and Z} then

To satisfy condition coverage, each Boolean expression X,Y and Z in above statement should be evaluated to TRUE and FALSE at least one time.

The TEST CASES for condition coverage will be:

TEST CASE1: X=TRUE, Y=TRUE, Z=TRUE
TEST CASE2: X=FALSE, Y=FALSE, Z=FALSE

To satisfy the decision coverage we need to ensure that the IF statement evaluates to TRUE and FALSE at least once. So the test set will be:

TEST CASE1: X=TRUE, Y=TRUE, Z=TRUE
TEST CASE2: X=FALSE, Y=FALSE, Z=FALSE

However, for MCDC, more than the above test cases is needed because, in MCDC, each Boolean variable should be evaluated to TRUE and FALSE at least once, which also affects the decision outcome.

So to ensure MCDC we need 4 more test cases.

TEST CASE3: X=FALSE, Y=FALSE, Z=TRUE
TEST CASE4: X=FALSE, Y=TRUE, Z=TRUE
TEST CASE5: X=FALSE, Y=TRUE, Z=FALSE
TEST CASE6: X=TRUE, Y=FALSE, Z=TRUE

In test case 3 decision outcome is FALSE
In test case 4 decision outcome is TRUE
In test case 5 decision outcome is FALSE
In test case 6 decision outcome is TRUE

So in the above test cases you can see that the change in the value of Boolean variables made a change in decision outcomes.