A C/C++ function with a decision based on a composed set of conditions highlights the difference between MCC and Condition Coverage:
bool isValidPosition(int x, int y, int z)
if ((x < 10 || y > 20) && z > 0)
As a result the number of possible combinations and number of needed tests for 100% Multiple Condition Coverage is reduced to these five:
|x > 10||y > 20||z > 0|
From the truth table shown the major drawback of this approach becomes immediately obvious in that number of possible combinations that need to be tested can ‘explode’ in light of big numbers of conditions. To mitigate this problem the Modified Condition/Decision Coverage metric was created.
froglogic was founded to create a best-of-breed cross-platform test automation tools. The froglogic Squish Testing Suite consists of the cross-platform and multi-language code coverage analysis tool Squish Coco and the GUI Test Automation Tool Squish GUI Tester. More details…
Find out more…
For more information on how to use MCC to determine code coverage within your application and how Squish Coco can generate the metrics you require please complete the form below.