为有效解决完全的分类树方法产生大量的冗余测试数据的问题,提出了将贪心算法和分类树相结合的方法.利用分类树方法和分类树工具自动生成测试数据集,通过运用贪心算法对分类树方法产生的测试数据进行选择,在满足给定覆盖标准的前提下,精简测试数据集,从而达到降低测试成本的同时也保持测试数据的有效性.最后实例应用结果表明,该方法较之完全的分类树方法大大减少了冗余测试数据的数量,提高了测试效率.%To solve the problem of redundant testing data generated by independent classification tree method effectively, based on the combination of the greedy algorithm and classification-tree method, a method is put forward. First, the testing data set is generated automatically by classification tree method and the tool of classification tree. Then, the greedy algorithm is used to choose the testing data set. On the premise of meeting the given coverage criterion, a smaller testing data set is generated. By adopting this method, it can reduce test costs and maintain the validity of test data. Finally, a case is given to demonstrate that this method can be used to generate much fewer test data than individual classification tree method and improve testing efficiency.
展开▼