Modified condition/decision coverage: Difference between revisions

Content deleted Content added
FrescoBot (talk | contribs)
m Bot: link syntax and minor changes
Line 13:
;Condition: A condition is a leaf-level [[Boolean algebra (logic)|Boolean]] [[Expression (programming)|expression]] (it cannot be broken down into simpler Boolean expressions).
 
;Decision: A Boolean expression composed of conditions and zero or more Boolean operators. A decision without a Boolean operator is a condition.
 
;Condition coverage: Every condition in a decision in the program has taken all possible outcomes at least once.
Line 28:
Purely syntactic rearrangements of decisions (breaking them into several independently evaluated conditions using temporary variables, the values of which are then used in the decision) which do not change the semantics of a program can 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 is driven by the program syntax. However, this kind of "cheating" can be done to simplify expressions, not simply to avoid MCDC complexities. For example, assignment of the number of days in a month (excluding leap years) could be achieved by using either a switch statement or by using a table with an enumeration value as an index. The number of tests required based on the source code could be considerably different depending upon the coverage required, although semantically we would want to test both approaches with a minimum number of tests.
 
== See also ==
*[[Elementary Comparison Testing|Elementary Comparison Testing]]
 
== References ==