首页|基于深度学习的回归测试用例优先级排序方法

基于深度学习的回归测试用例优先级排序方法

扫码查看
在回归测试中对测试用例排序可以更快地发现代码缺陷,节约测试时间和资源,提高测试效率.现有的测试用例排序方法没有同时考虑代码的变更信息以及测试用例的历史执行信息,也没有考虑不同测试用例执行历史长短的区别,因此排序效果不佳.针对这些问题,提出基于深度学习的回归测试用例优先级排序方法.首先分别构建基于代码变更信息和历史执行信息的分类模型;然后基于类间关系图识别受代码变更影响的类,对这些类的测试用例以及近期执行发现缺陷的测试用例进行分类,使用分类模型和启发式排序方法对测试用例分类进行排序;最后通过交替排序融合排序结果.在RTPTorrent数据集上选取6个项目进行实验,结果表明:1)在无时间约束时,所提方法在所有项目上都取得了不错的排序效果,在cloudify项目上的APFD指标达到0.972;2)在有时间约束时,所提方法的NAPFD指标超过了目前主流的排序方案.
Regression Test Case Prioritization Approach Based on Deep Learning
Prioritizing test cases in regression testing can expedite the detection of code defects,save testing time and resources,and enhance testing efficiency.However,existing test case prioritization methods often fail to consider both code change informa-tion and test case execution history simultaneously,and they do not adequately account for differences in the length of test case execution history,resulting in poor prioritization outcomes.To address these issues,this paper introduces a deep learning-based approach for prioritizing regression test cases.Initially,it constructs classification models based on code change information and historical execution data separately.Subsequently,it identifies classes affected by code changes using inter-class relationship graphs and classifies test cases belonging to these classes,as well as those that have recently exposed defects.Finally,it employs classification models and heuristic sorting method to prioritize the test cases,followed by merging the sorted results through an iterative process.Experimental results on 6 projects selected from the preprocessed RTPTorrent dataset demonstrate that:1)in scenarios without time constraints,the proposed approach achieves impressive prioritization results across all projects,with an APFD of 0.972 on the cloudify project;2)under time-constrained conditions,the proposed approach outperforms popular existing prioritization methods in terms of NAPFD metrics.

Test case prioritizationDeep learningInterclass relation graphClassification modelCategorization sorting

张李政、杨秋辉、李兴佳、代声馨

展开 >

四川大学计算机学院 成都 610065

测试用例排序 深度学习 类间关系图 分类模型 分类排序

2024

计算机科学
重庆西南信息有限公司(原科技部西南信息中心)

计算机科学

CSTPCD北大核心
影响因子:0.944
ISSN:1002-137X
年,卷(期):2024.51(12)