摘要
为解决基于集合进化算法(SEA)的弱变异测试用例集生成过程中个体规模固定和执行开销大的问题,提出一种基于动态集合进化算法(DSEA)的弱变异测试用例集生成方法。以测试用例集为个体,生成覆盖所有变异分支的弱变异测试用例集。在进化过程中,集合精简算子根据最优个体的最小子集及其未覆盖变异分支数量计算所需测试用例集的最小规模,并基于该最小规模调整种群中所有个体的规模,以生成最小规模的弱变异测试用例集,同时设计了适用于评估以测试用例集为个体的适应度函数。实验结果表明,动态集合进化算法指导弱变异测试用例集生成,获得的测试用例集规模比个体初始规模平均约简了50.15%,执行时间比集合进化的弱变异测试用例集生成最多降低了74.58%。因此,动态集合进化算法为最小规模的弱变异测试用例集生成和提升算法速度提供了一种解决方案。
To solve the problem of fixed individual scale and high execution cost of weak mutation test case set generation based on Set Evolutionary Algorithm (SEA), a generation method of weak mutation test case set based on Dynamic Set Evolutionary Algorithm (DSEA) was proposed. The test case sets were used as individuals to generate some weak mutations to cover all mutant branches. In the evolutionary process, according to the minimum subset of the optimal individuals and the number of uncovered mutation branches, the minimum scale of the required test case set was calculated by the set compact operator. And the size of all individuals in the population was adjusted based on the minimum scale to generate the smallest scale of the weak mutation test case set. At the same time, a fitness function for assessing a use case set as an individual was designed. The experimental results show that when the dynamic ensemble evolution algorithm is used to guide the generation of weak mutation test cases, and the scale of the test cases was 50.15% lower than the initial size of the individuals, and the execution time is lower than that of SEA by 74.58% at most. Thus, the dynamic ensemble evolution algorithm provides a solution for generating of the weak mutation test case set with minimum scale and enhancing the algorithm speed.
出处
《计算机应用》
CSCD
北大核心
2017年第9期2659-2664,2677,共7页
journal of Computer Applications
基金
国家自然科学基金资助项目(61472025
61672085)~~
关键词
测试用例生成
弱变异测试
分支覆盖
集合进化算法
贪心算法
test case generation weak mutation testing branch coverage Set Evolutionary Algorithm (SEA) greedy algorithm