Automatic Test Data Generation for Unit Testing to Achieve MC/DC Criterion
Tianyong Wu, Jun Yan, Jian Zhang · 2014
Modified Condition/Decision Coverage (MC/DC) became widely used in software testing, especially in safety-critical domain. However, existing testing tools often aim at achieving statement or branch coverage and do not support test generation for MC/DC. In this paper, we propose a novel test generation method to find appropriate test data for MC/DC. Specifically, we first extract paths from the target program and then find appropriate test data to trigger these paths. In the path extraction process, we propose a greedy strategy to determine the next selected branch. The evaluation results show that our method can actually generate test data quickly and the coverage increases a lot (up to 37.5%) compared with existing approaches.