Complete Communications Engineering

Modified Condition / Decision Coverage (MC/DC) is used in the development and testing of safety-critical software.  MC/DC extends the requirements of statement and decision coverage.  Statement coverage requires every line of the SUT to be executed.  Decision Coverage requires every possible output of SUT to be tested for.  MC/DC requires not only every decision to coverage, but to prove that every condition affects the result of a given decision.

To be in certified for Level A of DO-178B and DO-178C, the testing of the software must have Modified Condition / Decision Coverage.

In order to achieve MC/DC for the following function, at least 4 tests are required.  2 more tests than what is needed to achieve statement and decision coverage.

int wheels_up_check()

 {

     int ret;

     bool alt = altitude_check();

     bool vel = velocity_check();

     bool gpio = wu_gpio_check();

     if (alt && vel && user) {

         ret = 1;

     }

     else {

         ret = 0;

     }

     return ret;

 }

 

 

This table below shows the minimum conditional tests of this decision.

Test

Altitude

Velocity

Wheels Up GPIO

Result

1

0

1

1

0

2

1

0

1

0

3

1

1

0

0

4

1

1

1

1

Tests 1 and 4 prove the altitude condition affects the outcome of the decision, by holding the velocity and GPIO conditions constant, and modifying the altitude condition.  The same has to be shown for the velocity and GPIO conditions independently.