Modified condition/decision coverage: Difference between revisions

Content deleted Content added
Reorganized Lead section to follow MOS:LEAD
More reordering
Line 1:
The '''modified condition/decision coverage''' ('''MC/DC''') is a [[code coverage]] criterion that requires all of the below during testing:<ref>{{cite journal | title = A Practical Tutorial on Modified Condition/ Decision Coverage |date=May 2001 | journal = NASA | last1 = Hayhurst | first1 = Kelly | last2 = Veerhusen | first2 = Dan | last3 = Chilenski | first3 = John | last4 = Rierson | first4 = Leanna | url = http://shemesh.larc.nasa.gov/fm/papers/Hayhurst-2001-tm210876-MCDC.pdf}}</ref>
 
*#Each entry and exit point is invoked
*Each decision tries every possible outcome
*#Each condition in a decision takes ontries every possible outcome
*#Each condition in a decision triestakes on every possible outcome
*Each entry and exit point is invoked
*#Each condition in a decision is shown to independently affect the outcome of the decision.
 
Independence of a condition is shown by proving that only one condition changes at a time.
 
MC/DC is used in the standardstandards [[DO-178B]] and [[DO-178C]] to ensure thatadequate [[Software testing|tested]] of the most critical (Level A) [[software]], which is defined as that software which could ''provide (or prevent failure of)'' continued safe flight and landing of an aircraft, is [[Software testing|tested]] adequately.
 
==Criticism==
 
The MC/DC coverage criterium is highly suspect. Purely syntactic rearrangements of decisions (breaking them into several independently evaluated conditions using temporary variables, the values are which are then used in the decision) which do not change the semantics of a program will dramatically lower the difficulty of obtaining complete MC/DC coverage.<ref>{{cite journal | title = The Effect of Program and Model Structure on MC⁄DC Test Adequacy Coverage | last1 = Rajan | first1 = Ajitha | last2 = Heimdahl | first2 = Mats | last3 = Whalen | first3 = Michael | date = March 2003 | url = http://se.inf.ethz.ch/old/teaching/2009-S/0276/slides/fiva.pdf }}</ref> This is because MC/DC does not consider the dataflow coming together in a decision but is starts off with the program syntax, it is thus easy to "cheat" either deliberately or involuntarily.
 
==Definitions==
Line 26 ⟶ 22:
 
;Modified condition/decision coverage: Every point of entry and exit in the program has been invoked at least once, every condition in a decision in the program has taken on all possible outcomes at least once, and each condition has been shown to affect that decision outcome independently. A condition is shown to affect a decision's outcome independently by varying just that condition while holding fixed all other possible conditions. The condition/decision criterion does not guarantee the coverage of all conditions in the module because in many [[test case]]s, some conditions of a decision are masked by the other conditions. Using the modified condition/decision criterion, each condition must be shown to be able to act on the decision outcome by itself, everything else being held fixed. The MC/DC criterion is thus much stronger than the condition/decision coverage.
 
==Criticism==
 
The MC/DC coverage criterium is highly suspectcontroversial. Purely syntactic rearrangements of decisions (breaking them into several independently evaluated conditions using temporary variables, the values are which are then used in the decision) which do not change the semantics of a program will dramatically lower the difficulty of obtaining complete MC/DC coverage.<ref>{{cite journal | title = The Effect of Program and Model Structure on MC⁄DC Test Adequacy Coverage | last1 = Rajan | first1 = Ajitha | last2 = Heimdahl | first2 = Mats | last3 = Whalen | first3 = Michael | date = March 2003 | url = http://se.inf.ethz.ch/old/teaching/2009-S/0276/slides/fiva.pdf }}</ref> This is because MC/DC does not consider the dataflow coming together in a decision but is starts off with the program syntax, it is thus easy to "cheat" either deliberately or involuntarily.
 
== References ==