Page 182 - 《软件学报》2026年第5期
P. 182
钱忠胜 等: 面向两阶段分组的测试用例优先级排序方法 2061
在 TETC 指标上分别最少提升 96.84%、99.29% 和 84.23%. 可见, 本文方法的设计思路是合理而有意义的.
4 总结与下一步工作
本文提出一种面向两阶段分组的测试用例优先级排序方法 TPG-TCP. 第 1 阶段进行粗粒度测试用例分组, 第
2 阶段进行细粒度测试用例分组排序, 不仅提高了排序的效率, 也提升了有效性.
1) 为减少在覆盖信息和排序处理上的时间消耗, 提出粗粒度用例分组. 利用测试用例间的隐藏关系, 将待测用
例集分为关键用例组与普通用例组, 减少对覆盖信息的冗余访问, 降低排序时间成本, 提高排序效率, 并为下一阶
段采用多样性策略排序做准备.
2) 为同时提高排序效率与有效性, 采用细粒度用例分组排序. 为减少 Additional 策略中随机因素的干扰, 通过
划定迭代次数将关键用例分组, 并提出基于用例潜力度的 TP-Additional 策略对一部分关键用例排序, 同时采用简
单高效的 Total 策略对普通用例与另一部分关键用例排序. 这在提高方法排序效率的同时也提升了有效性.
3) 为验证所提方法效果, 展开综合实验分析. 所提方法 TPG-TCP 无论是与经典方法还是最新方法对比, 在 2
个常用 TCP 指标上均有明显提升. 同时通过消融实验, 验证了方法各构件的必要性.
虽然本文所提方法 TPG-TCP 较优, 但依旧存在一些待完善之处, 其中关键用例组的划分条件较为宽松, 未深
入考虑用例间覆盖信息的相似程度. 在后续研究中, 我们会尝试探索合适的机器学习方法, 试图在捕获用例覆盖信
息相似性的同时, 也能保证方法的高效性.
References
[1] Yu XL, Jia K, Hu WH, Tian J, Xiang JW. Black-box test case prioritization using log analysis and test case diversity. In: Proc. of the 34th
IEEE Int’l Symp. on Software Reliability Engineering Workshops (ISSREW). Florence: IEEE, 2023. 186–191. [doi: 10.1109/
ISSREW60843.2023.00072]
[2] Lima JAP, Vergilio SR. A multi-armed bandit approach for test case prioritization in continuous integration environments. IEEE Trans.
on Software Engineering, 2022, 48(2): 453–465. [doi: 10.1109/TSE.2020.2992428]
[3] Khan A, Azim A, Liscano R, Smith K, Tauseef Q, Seferi G, Chang YK. Machine learning-based test case prioritization using
hyperparameter optimization. In: Proc. of the 2024 IEEE/ACM Int’l Conf. on Automation of Software Test (AST). Lisbon: IEEE, 2024.
125–135.
[4] Felding E, Strandberg PE, Quttineh NH, Afzal W. Resource constrained test case prioritization with simulated annealing in an industrial
context. In: Proc. of the 39th ACM/SIGAPP Symp. on Applied Computing. Avila: ACM, 2024. 1694–1701. [doi: 10.1145/3605098.
3635971]
[5] Fan SP, Wan L, Yao NM, Zhang Y, Ma BY. Test case sorting method based on key use cases extracted. Acta Electronica Sinica, 2022,
50(1): 149–156 (in Chinese with English abstract). [doi: 10.12263/DZXB.20201284]
[6] Elbaum S, Malishevsky AG, Rothermel G. Test case prioritization: A family of empirical studies. IEEE Trans. on Software Engineering,
2002, 28(2): 159–182. [doi: 10.1109/32.988497]
[7] Rothermel G, Untch RH, Chu CY, Harrold MJ. Test case prioritization: An empirical study. In: Proc. of the 1999 IEEE Int’l Conf. on
Software Maintenance (ICSM). Oxford: IEEE, 1999. 179–188. [doi: 10.1109/ICSM.1999.792604]
[8] Li F, Zhou JY, Li YZ, Hao D, Zhang L. AGA: An accelerated greedy additional algorithm for test case prioritization. IEEE Trans. on
Software Engineering, 2022, 48(12): 5102–5119. [doi: 10.1109/TSE.2021.3137929]
[9] Zhao YF, Hao D. Test case prioritization technique in continuous integration based on reinforcement learning. Ruan Jian Xue Bao/Journal
of Software, 2023, 34(6): 2708–2726 (in Chinese with English abstract). https://www.jos.org.cn/1000-9825/6506.htm [doi: 10.13328/j.
cnki.jos.006506]
[10] Miranda B, Cruciani E, Verdecchia R, Bertolino A. FAST approaches to scalable similarity-based test case prioritization. In: Proc. of the
40th IEEE/ACM Int’l Conf. on Software Engineering. Gothenburg: IEEE, 2018. 222–232. [doi: 10.1145/3180155.3180210]
[11] Zhang QJ, Fang CR, Sun WS, Yu SC, Xu YT, Liu YL. Test case prioritization using partial attention. Journal of Systems and Software,
2022, 192: 111419. [doi: 10.1016/j.jss.2022.111419]
[12] Wang XL, Zhang SL. Cluster-based adaptive test case prioritization. Information and Software Technology, 2024, 165: 107339. [doi: 10.
1016/j.infsof.2023.107339]

