Page 185 - 《软件学报》2021年第7期
P. 185
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software,2021,32(7):2103–2117 [doi: 10.13328/j.cnki.jos.006264] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
基于偶然正确性概率的回归测试选择方法
周小莉, 赵建华
(计算机软件新技术国家重点实验室(南京大学),江苏 南京 210023)
通讯作者: 赵建华, E-mail: zhaojh@nju.edu.cn
摘 要: 数据驱动的智能系统的核心是处理数据的算法,对算法正确性的要求高,导致其测试开销大,需要有效地
缩减测试的规模,其中回归测试选择是控制测试规模的有效手段.数据驱动的智能系统由于其动态信息流强度弱的
原因,发生偶然正确性现象的概率较高,并且该现象会导致常用的回归测试选择技术所选择出的测试集包含大量检
测不到故障的测试用例.因此,从偶然正确性现象的角度出发,提出一种基于偶然正确性概率的回归测试选择技术,
进一步排除可能发生偶然正确性现象的用例.该方法能够兼顾代码覆盖,同时从偶然正确性的角度保证缩减后的测
试用例集合对被修改的代码的测试是充分的.根据在用例缩减和故障检测能力之间侧重的不同,提出了基于最小化
和安全性技术的两种选择策略,并给出 3 种具体的选择算法.在实验中将所提方法与一种安全的测试选择技术进行
比较,结果表明,这 3 种选择算法都很好地缩减了测试集合的规模,提高了测试选择的精度,并提高了安全性和精度的
综合指标.
关键词: 偶然正确性现象;回归测试;回归测试选择
中图法分类号: TP311
中文引用格式: 周小莉,赵建华.基于偶然正确性概率的回归测试选择方法.软件学报,2021,32(7):2103–2117. http://www.jos.
org.cn/1000-9825/6264.htm
英文引用格式: Zhou XL, Zhao JH. Regression test selection method based on coincidental correctness probability. Ruan Jian Xue
Bao/Journal of Software, 2021,32(7):2103–2117 (in Chinese). http://www.jos.org.cn/1000-9825/6264.htm
Regression Test Selection Method Based on Coincidental Correctness Probability
ZHOU Xiao-Li, ZHAO Jian-Hua
(State Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China)
Abstract: For data-driven intelligent systems, the data processing algorithms are very important and need to be tested adequately.
Because of the high safety requirement, the cost of testing becomes very high and reducing such cost is needed. Regression test selection is
an effective mean to control the scale of testing. For data-driven intelligent systems, the coincidental correctness happens frequently
because of the weak dynamic information flows, and leads that the regression test sets contain a lot of redundant tests. Therefore, a
regression test selection technique is proposed based on the coincidental correctness probability. This method considers the probability of
coincidental correctness in addition to the code coverage. The selected tests not only cover the modified code, but have a higher
probability to transfer the intermediate results produced by the modified code to the program output. Such selection can reduce the impact
of coincidental correctness. The empirical results show that the proposed selection method can improve the precision of selection and
reduce the size of the regression tests.
Key words: coincidental correctness; regression testing; regression test selection
1 引 言
数据驱动的智能化软件系统是一类非确定性软件系统,且日益应用于一些安全相关的领域,对其软件质量
本文由“面向非确定性的软件质量保障方法与技术”专题特约编辑陈俊洁副教授、汤恩义副教授、何啸副教授以及马晓星教
授推荐.
收稿时间: 2020-09-14; 修改时间: 2020-10-26; 采用时间: 2020-12-14; jos 在线出版时间: 2021-01-22