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

Two test paths leaving the same device under test, one into a conformance suite that returns a passed report and one into a partner node that surfaces a field defect, showing why an ECU can clear a published suite and still fail in a vehicle, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

Automotive Ethernet Conformance: TC8 and Testing Above It

Summarising TC8 as a layer 1 to layer 4 suite is wrong in both directions. The public OPEN Alliance ECU test documents run from transmitter distortion up to a SOME/IP chapter with its own standardised test stub, and they contain exactly one time synchronisation test case. This is what those documents enumerate, chapter by chapter, what genuinely lives above their boundary, why a passing ECU can still fail against a partner node, and how much pre-compliance work a Tier-1 in India can honestly do in-house before a test house visit. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 12 min read
One campaign, two fault families drawn as a two-column map: electrical faults and protocol faults on the left, each running through detection, reaction, recovery and evidence on the right, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

Fault Injection in HIL: Open Load, Shorts, Malformed Frames

Fault injection material splits in two. Switching-hardware pages describe relay matrices and open-load wiring; software-testing posts describe malformed input. A vehicle network fails across both at once, because an intermittent short changes link quality and the stack above then behaves badly. This article puts electrical and protocol faults into one campaign, writes the observable and the expected reaction down per fault, and treats the fault insertion hardware itself as a signal-integrity risk you have to characterise before you trust a result. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 12 min read
SecOC freshness value desync on one timeline: a sender counter and a receiver counter running together until a reset event moves one of them, then a window of messages that carry a valid authenticator but are still rejected, ending at resynchronisation, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

SecOC vs MACsec vs TLS: Automotive Security Layers

SecOC, MACsec and TLS get compared as if a programme picks one. They are three different scopes, and most vehicles carry more than one. This article separates them in a single table by scope, unit protected, key source and what a capture still shows, then covers the two things almost nobody writes down: what each layer does to your ability to debug, and why an ECU can reject a message whose authenticator is perfectly valid after a reset. Protocol claims trace to the public AUTOSAR SecOC protocol specification, IEEE 802.1, the Wireshark dissector sources and Linux networking documentation. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 12 min read