Journal of Computer Applications ›› 2017, Vol. 37 ›› Issue (9): 2659-2664.DOI: 10.11772/j.issn.1001-9081.2017.09.2659

Previous Articles     Next Articles

Weak mutation test case set generation based on dynamic set evolutionary algorithm

GUO Houqian, WANG Weiwei, SHANG Ying, ZHAO Ruilian   

  1. College of Information Science and Technology, Beijing university of Chemical Technology, Beijing 100029, China
  • Received:2017-03-30 Revised:2017-04-23 Online:2017-09-10 Published:2017-09-13
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61472025, 61672085).

基于动态集合进化算法的弱变异测试用例集生成

郭后钱, 王微微, 尚颖, 赵瑞莲   

  1. 北京化工大学 信息科学与技术学院, 北京 100029
  • 通讯作者: 尚颖,Shangy@mail.buct.edu.cn
  • 作者简介:郭后钱(1990-),女,安徽六安人,硕士研究生,主要研究方向:软件测试;王微微(1990-),女,河北沧州人,博士研究生,CCF会员,主要研究方向:软件测试;尚颖(1976-),女,吉林四平人,讲师,博士,CCF会员,主要研究方向:软件测试;赵瑞莲(1964-),女,山西忻州人,教授,博士,CCF会员,主要研究方向:软件测试、软件可靠性分析。
  • 基金资助:
    国家自然科学基金资助项目(61472025, 61672085)。

Abstract: 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.

Key words: test case generation, weak mutation testing, branch coverage, Set Evolutionary Algorithm (SEA), greedy algorithm

摘要: 为解决基于集合进化算法(SEA)的弱变异测试用例集生成过程中个体规模固定和执行开销大的问题,提出一种基于动态集合进化算法(DSEA)的弱变异测试用例集生成方法。以测试用例集为个体,生成覆盖所有变异分支的弱变异测试用例集。在进化过程中,集合精简算子根据最优个体的最小子集及其未覆盖变异分支数量计算所需测试用例集的最小规模,并基于该最小规模调整种群中所有个体的规模,以生成最小规模的弱变异测试用例集,同时设计了适用于评估以测试用例集为个体的适应度函数。实验结果表明,动态集合进化算法指导弱变异测试用例集生成,获得的测试用例集规模比个体初始规模平均约简了50.15%,执行时间比集合进化的弱变异测试用例集生成最多降低了74.58%。因此,动态集合进化算法为最小规模的弱变异测试用例集生成和提升算法速度提供了一种解决方案。

关键词: 测试用例生成, 弱变异测试, 分支覆盖, 集合进化算法, 贪心算法

CLC Number: