LDRA tool suite

 

LDRA tool suite components

 
 

Standard Adherence

 
 
 
Register
 
TBsafe™ - Modified Condition / Decision Coverage (MC/DC)


What is MC/DC?

Modified Condition Decision Testing, Branch Condition Testing and Branch Condition Combination Testing are closely related, as are the associated coverage measures.

Consider the following fragment of code:

The Boolean operands within the decision condition are A, B and C. These may themselves be comprised of complex expressions involving relational operators. For example, the Boolean operand A could be an expression such as X >= Y.

However, for the sake of clarity, the following examples regard A, B and C as simple Boolean operands.

Understanding MC/DC

MC/DC is calculated using the following relationship:

It is a pragmatic compromise which requires fewer test cases than BCCC. It is widely used in the development of avionics software, as required by the RTCA/DO-178B standard.

MC/DC requires test cases to show that each Boolean operand (A, B and C) can independently affect the outcome of the decision. This is less than all the combinations (as required by BCCC).

Example

For the example condition, MC/DC may be achieved with the following set of test inputs (note that there are alternative sets of test inputs, which will also achieve MC/DC):

Case A B C Outcome

1 FALSE FALSE TRUE FALSE
2 TRUE FALSE TRUE TRUE
3 FALSE TRUE TRUE TRUE
4 FALSE TRUE FALSE FALSE

In the above example:

  • A is shown to independently affect the outcome of the decision condition by case 1 and case 2;
  • B is shown to independently affect the outcome of the decision condition by case 1 and case 3;
  • C is shown to independently affect the outcome of the decision condition by case 3 and case 4.

To achieve 100% MC/DC requires a minimum of n+l test cases, and a maximum of 2n test cases. It is therefore a practical compromise with Branch Condition Combination Coverage where condition expressions involve more than just a few Boolean operands.

Measuring MC/DC with LDRA Testbed

The LDRA Testbed will display the following MC/DC Coverage results criteria:

  • The list of Branch Conditions (BC) produced in the BC analysis to obtain the Branch Condition Number.
  • The table of Branch Condition Combinations (BCC) produced in the BCC analysis to determine which combinations have been exercised.

The MC/DC analysis is presented for each expression listed at the foot of the Branch Condition Coverage section of the Dynamic Coverage Analysis report.

Obtaining Further Information

For further information on this particular feature of TBsafe and its availability please complete the LDRA reply form or email .


 

 
     
HomeAbout UsProductsServicesDownloadsMedia CentreContact Us