软件导刊2026,Vol.25Issue(1):75-82,8.DOI:10.11907/rjdk.241811
基于代码变更与历史信息的测试用例优先级排序
Test Case Prioritization Based on Code Changes and Historical Information
摘要
Abstract
The existing methods for prioritizing test cases often rely on a single data source or analysis technique,which cannot fully capture the potential factors that affect the importance of test cases and limits the effectiveness of the ranking.To this end,a test case prioritization framework SSH-TCP based on code changes and historical information is proposed.Firstly,in the coarse-grained filtering stage,a candidate test case set is obtained through an information retrieval model;Secondly,in the fine-grained sorting stage,pre trained language models and centrality analysis based on abstract syntax trees are used to calculate the semantic and syntactic similarity of code changes and test cases,re-spectively;Finally,the final ranking result is determined based on the average historical failure rate of the test cases.The experiment shows that SSH-TCP outperforms all baseline models in terms of average fault detection rate considering cost,verifying the effectiveness of the pro-posed framework in improving the prioritization of test cases.关键词
测试用例排序/代码变更/语义相似度/语法相似度/历史失败率Key words
test case prioritization/code changes/semantic similarity/syntactic similarity/historical failure rate分类
信息技术与安全科学引用本文复制引用
李晋英,刘峰,罗远哲,刘瑞景..基于代码变更与历史信息的测试用例优先级排序[J].软件导刊,2026,25(1):75-82,8.基金项目
铁路轨道在轨安全检测大数据系统开发与验证项目(ZCWY-NB-CG-20231116-220) (ZCWY-NB-CG-20231116-220)
云测试软件系统开发与验证项目(ZCWY-NB-CG-20240730-145) (ZCWY-NB-CG-20240730-145)