Journal of Computer Applications ›› 2017, Vol. 37 ›› Issue (12): 3592-3596.DOI: 10.11772/j.issn.1001-9081.2017.12.3592

Previous Articles     Next Articles

Reduction method of test suites based on mutation analysis

WANG Shuyan, CHEN Pengyuan, SUN Jiaze   

  1. School of Computer Science and Technology, Xi'an University of Posts and Telecommunications, Xi'an Shaanxi 710061, China
  • Received:2017-06-12 Revised:2017-08-04 Online:2017-12-10 Published:2017-12-18
  • Supported by:
    This work is partially supported by the Industrial Science and Technology Research Project of Shaanxi Province (2017GY-092), the Natural Science Foundation of Shaanxi Education Department (15JK1678).

基于变异分析的测试用例约简方法

王曙燕, 陈朋媛, 孙家泽   

  1. 西安邮电大学 计算机学院, 西安 710061
  • 通讯作者: 王曙燕
  • 作者简介:王曙燕(1964-),女,陕西西安人,教授,博士,主要研究方向:软件测试、数据挖掘、智能信息处理;陈朋媛(1991-),女,陕西西安人,硕士研究生,主要研究方向:软件测试、数据挖掘;孙家泽(1980-),男,陕西西安人,副教授,博士,主要研究方向:软件测试、数据挖掘、智能信息处理。
  • 基金资助:
    陕西省工业科技攻关项目(2017GY-092);陕西省教育厅自然科学基金项目(15JK1678)。

Abstract: The scale of test suites is constantly expanding and the cost of testing is increasing due to the change of test requirements in the process of regression testing. In order to solve the problems, a Reduction method of Test suites based on the analysis of Mutation (RTM) was proposed. Firstly, the test suites were classified and the transaction set matrix of mutants was created in binary numerical form according to whether the designated mutants could be detected or not by test suites. Then, the correlation relation between test suites was obtained by using the improved association mining algorithm. Finally, the test suites were effectively reduced according to these relations. The simulation experimental results of the six classical programs show that, the test suite reduction rate of the proposed RTM can reach 37%. Compared with the traditional greedy algorithm and heuristic algorithm, the proposed RTM improves the test suite reduction rate by 6%, and can guarantee the test coverage rate at the same time, even the test coverage rate of a single test suite increases by 11% on average. The proposed method can meet more test requirements by using fewer test suites, effectively improving test efficiency and reducing test cost.

Key words: regression testing, test suite reduction, analysis of mutation, mutant, association mining

摘要: 针对回归测试过程中由于测试需求的变更导致测试用例规模不断扩大、测试成本不断增加的问题,提出一种基于变异分析的测试用例约简方法(RTM)。首先,以测试用例能否检测到指定变异体为依据,对测试用例进行划分并创建二进制数值形式的变异体事务集矩阵;然后,应用改进的关联挖掘算法获取测试用例间的关联关系;最后,根据这些关联关系有效约简测试用例。6个经典程序仿真实验结果表明,RTM能够使约简后的测试用例约简率达到37%,与传统贪心算法和启发式算法相比,测试用例约简率提高了6%,且在提高测试用例约简率的同时,保证了测试覆盖率,单个测试用例的测试覆盖率平均提高了11%。所提方法能够利用尽可能少的测试用例满足更多的测试需求,有效提高了测试效率,降低了测试成本。

关键词: 回归测试, 测试用例约简, 变异分析, 变异体, 关联挖掘

CLC Number: