Counter-exemple: full Condition coverage does not necessarily implies full Decision coverageAssume we want to test the following code extract: if ( ((u=0) or (x>5)) and ((y<6) or (z=0)) ) then Following truth table sums up all conceivable test cases for this code extract:
To ensure Condition coverage, we should test (for example) just the 2 combinations here-before underlined in yellow. However, for both cases, the decision's outcome is evaluated 2 times to "true" but never to "false": Decision coverage is not effective... We should for example choose the 2 combinations here-before underlined in blue to ensure both Condition and Decision coverage. Go back to Test Coverage Levels The Test Coverage Analyzer Testwell CTC++ can do measurements for all kinds of test coverage criteria (particularly for MC/DC and MCC) requested for "critical software development" in order to get certifications, such as DO-178B of the Federal Aviation Administration (FAA). Glossary: Condition: a logical indivisible (atomic) expression. It is often called boolean variable, represented by a capital letter (A, B, C, etc.), can only be equal to "true" or "false", but can not be divided in other simpler "sub-conditions". Decision : a logical expression which can be composed of several conditions separated by logical operators like "or", "and", "xor". last updated: 21.07.2010 © 2010 Verifysoft GmbH |