摘要
组合测试是一种高效的测试手段,但测试用例集的生成是一个NP完全问题。逐参数扩展的策略(In-Parameter-Order,IPO)是每次加入一个参数,将问题分解为水平(参数)扩展和垂直(测试用例)扩展,其水平和垂直扩展都使用贪心算法。针对IPO算法扩展时贪心算法容易陷入局部次优解的问题,提出一种基于蚁群算法的逐参数扩展组合测试用例生成算法,该算法在水平扩展中引入蚁群算法替换原有的贪心算法,有效提高全局搜索能力,避免陷入局部次优解。实验结果表明:该算法与IPO算法相比,生成的测试用例集的规模较小。
Combinatorial testing is a very effective means to software testing, but the test cases genera- tion is a NP-complete problem. In-Parameter-Order strategy is one of the state-of-art methods of combi- natorial testing. It divides the problem as two parts: horizontal (parameters) extension and vertical ( test cases) extension which are all solved by greedy algorithm. Aiming at solving the problem of local solution introduced by greedy strategy of IPO, this paper presents an algorithm which introduces ant-col- ony-algorithm to horizontal extension of IPO. It enhances the global search ability avoiding to running in- to local solution. As shown by experiments, the size of test cases generated by the proposed method is smaller than IPO.
出处
《西南科技大学学报》
CAS
2013年第3期61-65,共5页
Journal of Southwest University of Science and Technology
关键词
组合测试
蚁群算法
测试用例
逐参数扩展
Combinatorial Testing
Ant-Colony-Algorithm
Test Cases
In-Parameter-Order