首页 | 本学科首页   官方微博 | 高级检索  
     

基于历史数据和多目标优化的测试用例排序方法
引用本文:李兴佳,杨秋辉,洪玫,潘春霞,刘瑞航.基于历史数据和多目标优化的测试用例排序方法[J].计算机应用,2023,43(1):221-226.
作者姓名:李兴佳  杨秋辉  洪玫  潘春霞  刘瑞航
作者单位:四川大学 计算机学院,成都 610065
摘    要:针对如何提高测试用例序列的揭错效率和回归测试效益问题,提出一种基于历史数据和多目标优化的测试用例排序方法。首先,根据测试用例的文本主题相似性和代码覆盖相似性对测试用例集进行聚类,并根据历史执行信息对测试用例间的执行失败关系进行关联规则挖掘,从而为后续过程做准备;然后,利用多目标优化算法对每个类簇内的测试用例进行排序,在此之后生成最终排序序列,使相似的测试用例分隔开;最后,利用测试用例间的关联规则,动态调整测试用例执行次序,从而使可能失败的测试用例优先执行,以进一步提高缺陷检测效率。与随机排序方法、基于聚类的排序方法、基于主题模型的排序方法、基于关联规则和多目标优化的排序方法相比,所提方法的平均故障检测率(APFD)平均值分别提高了12.59%、5.98%、3.01%和2.95%,基于成本的平均故障检测率(APFDc)平均值分别提高了17.17%、5.04%、5.08%和8.21%。实验结果表明,所提方法能有效提高回归测试效益。

关 键 词:回归测试  测试用例聚类  关联规则挖掘  测试用例排序  多目标优化
收稿时间:2021-11-28
修稿时间:2022-05-01

Test case prioritization approach based on historical data and multi-objective optimization
Xingjia LI,Qiuhui YANG,Mei HONG,Chunxia PAN,Ruihang LIU.Test case prioritization approach based on historical data and multi-objective optimization[J].journal of Computer Applications,2023,43(1):221-226.
Authors:Xingjia LI  Qiuhui YANG  Mei HONG  Chunxia PAN  Ruihang LIU
Affiliation:College of Computer Science,Sichuan University,Chengdu Sichuan 610065,China
Abstract:To improve the error detection efficiency and the benefit of regression testing of test case sequence, a test case prioritization approach based on historical data and multi-objective optimization was proposed. Firstly, the test case set was clustered according to the text topic similarity and code coverage similarity of test cases, and the association rules were mined for execution failure relationships between test cases according to the historical execution information, thereby preparing for the subsequent process. Then, the multi-objective optimization algorithm was used to sort the test cases in each cluster. After that, the final sorting sequence was generated to separate the similar test cases. Finally, the association rules between test cases were used to dynamically adjust the execution order of test cases, so that the test cases that may fail were executed with priority, so as to further improve the efficiency of defect detection. Compared with random search approach, the approach based on clustering, the approach based on topic model, the approach based on association rules and multi-objective optimization, the proposed approach has the average value of Average Percentage of Faults Detected (APFD) increased by 12.59%, 5.98%, 3.01% and 2.95%, respectively, and has the average value of APFD cost-cognizant (APFDc) increased by 17.17%, 5.04%, 5.08% and 8.21%, respectively. Experimental results show that the proposed approach can improve the benefit of regression testing effectively.
Keywords:regression test  test case clustering  association rule mining  test case prioritization  multi-objective optimization  
点击此处可从《计算机应用》浏览原始摘要信息
点击此处可从《计算机应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号