Skip to main content
MC/DC Coverage Explained: What It Is, Why You Need It, and How TESSY Achieves 100%, featured image

MC/DC Coverage Explained: What It Is, Why You Need It, and How TESSY Achieves 100%

GSAS Editorial · · 8 min read

MC/DC stands for Modified Condition/Decision Coverage. It is a structural coverage metric that requires every atomic condition inside a compound decision to be shown by test to independently change the decision outcome. It is the coverage level ISO 26262 Part 6 recommends for ASIL D unit testing and DO-178C requires for DAL A software.

If you are working on an ISO 26262 ASIL D automotive project or a DO-178C DAL A avionics project, your safety plan almost certainly requires MC/DC coverage for unit testing. It is the most rigorous structural coverage metric in common use, and the one safety assessors examine most carefully during certification reviews.

This guide explains MC/DC from first principles, what it measures, why safety standards require it, and how Razorcat TESSY helps engineering teams achieve 100% MC/DC on real embedded codebases.

The Coverage Hierarchy

Structural coverage metrics form a hierarchy, from weakest to strongest. MC/DC sits at the top of the set that is practical to require on production code.

MetricWhat it requiresWhere it is mandated or recommended
Statement coverageEvery statement in the function has been executed at least onceThe floor. Tells you no code is completely dead, and nothing about whether branches were tested
Branch coverageEvery branch (if/else, switch case, loop entry and exit) has been taken at least onceEnsures both outcomes of each decision have been exercised
Decision coverageEvery decision, meaning every boolean expression that controls program flow, has evaluated both true and falseEquivalent to branch coverage for simple conditions; subtly different for compound conditions
MC/DCEvery atomic condition within a compound decision has been shown to independently affect the decision outcomeISO 26262 Part 6, strongest recommendation at ASIL D unit testing; DO-178C for DAL A; IEC 61508 Part 3 for SIL 3 and SIL 4

What MC/DC Actually Measures

Consider this compound condition from a motor controller:

if (motor_temp > TEMP_LIMIT && speed > 0 && enable_flag == true)
{
    activate_thermal_protection();
}

This decision has three atomic conditions:

  • A: motor_temp > TEMP_LIMIT
  • B: speed > 0
  • C: enable_flag == true

MC/DC requires demonstrating that each condition independently affects the decision outcome. For condition A, you need two test cases where:

  • B and C are held constant (both true)
  • A changes from false to true
  • The decision outcome changes accordingly

Similarly for conditions B and C. The minimum number of test cases for MC/DC on N conditions is N+1 (for this example, 4 test cases).

Written out in full, this is the MC/DC test set for the decision above:

TestA: motor_temp > TEMP_LIMITB: speed > 0C: enable_flag == trueDecisionProves
T1truetruetruetrueBaseline for all three independence pairs
T2falsetruetruefalseA is independent (pair T1 / T2, B and C fixed true)
T3truefalsetruefalseB is independent (pair T1 / T3, A fixed true)
T4truetruefalsefalseC is independent (pair T1 / T4, A and B fixed true)

Four test cases, N+1 for N=3, and each of the three conditions has an independence pair that differs in that condition alone. Note that the set also survives C’s short-circuit semantics: in T4 both A and B are true, so enable_flag is genuinely evaluated, and in T1 it is evaluated as well. A test set that flipped C only in a case where B was already false would never execute C at all and would prove nothing about it.

The key word is independently. Branch coverage only requires that the overall decision evaluates to true in one test and false in another. MC/DC requires proving that each individual condition matters. This catches defects where a condition is present in the code but never actually influences the outcome, often a sign of a logic error or dead condition.

Why Safety Standards Require MC/DC

Safety standards require MC/DC because it provides the strongest practical evidence that the control flow logic is correct. Specifically:

ISO 26262 Part 6 gives MC/DC its strongest recommendation at ASIL D unit testing. The rationale: ASIL D functions have the highest criticality, and any defect in their control flow logic could lead to a hazardous event. MC/DC ensures that every condition in every decision has been proven relevant. It is a recommendation and not a mandate, because the standard has no “mandatory” rating and the unit-level coverage metrics are alternative entries, so an ASIL D project applies an appropriate combination and gives a rationale for the combination it selected.

DO-178C requires MC/DC for DAL A structural coverage. Aviation safety has mandated MC/DC for the highest criticality level since DO-178B (1992), which makes it the longest-standing MC/DC mandate of the three standards listed here.

IEC 61508 Part 3 recommends MC/DC for SIL 3 and SIL 4 software. Industrial safety controllers, emergency shutdown systems, and railway interlocking all benefit from MC/DC-level testing.

The Challenge: Achieving 100% MC/DC

Statement coverage and branch coverage are relatively straightforward to achieve, a moderate set of test cases typically reaches high coverage. MC/DC is harder because:

Complex boolean expressions require more test cases. A decision with 5 atomic conditions (common in fault detection logic) needs a minimum of 6 MC/DC test cases, but identifying the right combinations requires careful analysis.

Short-circuit evaluation complicates MC/DC. In C, && and || use short-circuit evaluation, if the first operand of && is false, the second is not evaluated. This means some condition combinations are unreachable, and the MC/DC analysis must account for this.

Compiler optimization can change condition evaluation. At higher optimization levels, the compiler may restructure boolean expressions, merge conditions, or eliminate redundant checks. MC/DC measured on the source must map to the compiled code’s actual behaviour.

Coupled conditions arise when two conditions share a variable (e.g., x > 0 && x < 100). Changing one condition may unavoidably change the other, making independent demonstration difficult. Per Razorcat, TESSY provides Multiple Condition Coverage (MCC), which requires every combination of condition outcomes in a decision to be invoked, giving exhaustive combination coverage evidence for these cases.

How TESSY Achieves 100% MC/DC

TESSY provides a systematic workflow for reaching full MC/DC coverage:

Step 1: Classification Tree Design

The Classification Tree Editor (CTE) helps engineers decompose the input space into equivalence classes and boundary values. For each atomic condition in a decision, the CTE defines the true/false input ranges, boundary values, and error conditions. This systematic approach ensures that MC/DC-relevant test vectors are generated as part of the test design, not discovered ad hoc during coverage gap analysis.

Step 2: Automated Coverage Measurement

TESSY instruments the code at the condition level, tracking which atomic conditions have been evaluated to true and false, and which have been shown to independently affect the decision outcome. Coverage results display as colour-coded source annotations, green for covered conditions, red for uncovered.

Step 3: Hyper Coverage from Hardware Trace

Per Razorcat, TESSY’s Hyper Coverage feature (in TESSY 5.x) integrates the Accemic Technologies hardware trace port analysis tool: FPGA-based online trace data processing acquires branch and MC/DC coverage data directly during system and integration testing. Imported into TESSY, that coverage appears at source file level in the Test Cockpit, closing gaps a unit test bench alone cannot reach, the paths that only execute once the target runs as a system.

Step 4: Iterative Test Addition

Engineers add targeted test cases to close MC/DC gaps. TESSY’s tabular test data editor makes it efficient to add test cases for specific condition combinations without disrupting existing test suites.

Practical Tips for Indian Teams

For teams in Pune and Bengaluru working on ASIL D AURIX-based ECUs, or teams in Hyderabad targeting IEC 61508 for industrial controllers:

  • Start with systematic test design (CTE) rather than ad hoc testing followed by coverage gap filling. Systematic design reaches higher initial MC/DC coverage and produces better audit evidence.
  • Test with the production compiler. MC/DC measured under GCC on x86 does not prove coverage on TASKING-compiled TriCore code. Use TESSY with your project’s cross-compiler.
  • Track MC/DC trends in CI. Set coverage gates in your Jenkins/GitLab pipeline so regressions are caught immediately, do not let MC/DC coverage slip during development.

Why Buy from GSAS

GSAS Micro Systems is the authorized Razorcat partner, providing TESSY licensing and MC/DC coverage consulting for ISO 26262, IEC 61508, and DO-178C projects. Our functional safety engineers in Bengaluru, Hyderabad, Chennai, Pune, Mumbai, and Delhi NCR train teams on the Classification Tree Method, configure TESSY for their target toolchain, and help achieve 100% MC/DC coverage on safety-critical modules.

Request a TESSY MC/DC workshop →

Interested in Razorcat tools?

Talk to our application engineers for personalized tool recommendations.

Frequently asked questions

What is the full form of MC/DC?
MC/DC stands for Modified Condition/Decision Coverage. It is a structural code coverage metric used in safety-critical software verification.
What does MC/DC coverage require?
MC/DC requires that every atomic condition inside a compound decision has been shown by test to independently affect the decision outcome, with the other conditions held fixed. Decision coverage only requires the overall decision to evaluate both true and false, so it can be satisfied without ever proving that a given condition matters.
How many test cases does MC/DC need?
For a decision with N atomic conditions, the minimum is N+1 test cases. A decision with three conditions therefore needs at least four, and one with five conditions needs at least six. The minimum is a lower bound: coupled conditions and short-circuit evaluation can make some combinations unreachable, so more cases are often required in practice.
Which standards require MC/DC?
DO-178C requires MC/DC for DAL A structural coverage, a requirement carried over from DO-178B in 1992. ISO 26262 Part 6 gives MC/DC its strongest recommendation at ASIL D unit testing, though the standard has no mandatory rating. IEC 61508 Part 3 recommends it for SIL 3 and SIL 4 software.
What is the difference between MC/DC and branch coverage?
Branch coverage requires each branch to be taken at least once, so for a compound decision it is satisfied as soon as the whole expression has evaluated true in one test and false in another. MC/DC goes further and requires proof that each individual condition independently drives the outcome, which is what catches a condition that is present in the source but never actually influences the decision.

Stay in the Loop

Get monthly compliance updates, product insights, and engineering best practices delivered to your inbox.

Related Articles

Classification tree and combination table used to design embedded unit test cases in Razorcat's Classification Tree Editor for TESSY, available in India from GSAS Micro Systems
Compliance & Safety Razorcat Automotive & Mobility

Test Case Design with the Classification Tree Method: Deriving Unit Tests You Can Defend in an Audit

Ad-hoc test cases can be perfectly good tests and still fail an audit, because nothing on file records why that particular set was sufficient. The Classification Tree Method derives test cases from the input space instead: identify the test-relevant aspects as classifications, partition each into equivalence classes, then combine leaf classes in a combination table. Razorcat implements CTM in the Classification Tree Editor, available integrated into TESSY or standalone. GSAS Micro Systems is the authorized Razorcat engineering partner for India, the UAE and Sri Lanka.

1 Aug 2026 · 10 min read
Fault injection and robustness testing for safety-related embedded C and C++ software, explained for Indian engineering teams by GSAS Micro Systems, the authorized Razorcat engineering partner
Compliance & Safety Razorcat Automotive & Mobility

Fault Injection and Robustness Testing for Embedded Software: What ISO 26262, IEC 61508 and DO-178C Actually Ask For

Every safety-related unit contains code that correct inputs never execute: range checks, error returns, timeouts, recovery paths. The functional safety standards require that code to be verified, and they are explicit about how. ISO 26262-6 lists fault injection test as a method for both software unit verification and software integration verification; IEC 61508-3 recommends defensive programming from SIL 2 upward and then concedes that defensive code is exactly what stops teams reaching 100 percent structural coverage. This guide separates robustness testing from fault injection, maps each to the obligation that asks for it, and shows how Razorcat implements automated fault injection in TESSY without leaving instrumentation in production code.

1 Aug 2026 · 11 min read
Buyer-side evaluation framework for embedded unit testing tools, covering compiler and debugger fit, on-target execution, coverage levels and qualification evidence, from GSAS Micro Systems in India
Compliance & Safety Razorcat Automotive & Mobility

How to Evaluate a Unit Testing Tool for Embedded Software: A Buyer's Framework for Indian Teams

Unit test tool evaluations rarely fail on features. They fail because the tool cannot drive the compiler and debugger the project is already committed to, or because the evidence it produces sits outside the scope of the certificate the assessor asks for. This is a buyer-side framework: six questions, what a credible answer looks like in vendor documentation, and a four-week pilot that measures the answers instead of accepting them.

1 Aug 2026 · 10 min read