Page 198 - 《软件学报》2021年第7期
P. 198
2116 Journal of Software 软件学报 Vol.32, No.7, July 2021
有较大的差异.其中,基于 CCP 的技术 1 更着重于测试用例的缩减,更大幅度地降低测试集合大小,但是也伴随着
安全性的降低.基于 CCP 的技术 2 和技术 3 更着重于选择更多的故障检测用例,在一定程度上缩减了测试集合,
并且安全性指标的降低幅度较小.基于 CCP 的技术 2 和技术 3 是策略 2 的两种算法的具体实现,较为复杂的技
术 3 在用例缩减、精度和 PR 指标上略优于技术 2,而技术 2 在安全性上的表现更好.在使用基于偶然正确性概
率的测试选择方法时,可以根据测试集合缩减和故障检测间侧重的不同来选择具体的测试选择技术.
5 总 结
回归测试选择技术是降低测试用例集合规模的一种有效手段,而偶然正确性现象的普遍存在使得回归测
试用例集合包含了大量无法检测故障的用例.因此,本文提出一种根据偶然正确性现象的发生概率进行回归测
试选择的方法,进一步缩减了测试用例集合的规模,提升了测试选择的精度.本文首先给出一种根据测试用例在
原始程序上的执行信息来估算被修改程序执行时发生偶然正确性现象的概率的方法,然后基于得到的偶然正
确性概率的估值来指导测试选择.根据在测试集合缩减和故障检测能力之间不同程度的侧重,本文提出了基于
最小化和安全性的两种选择策略,并给出 3 种具体的选择技术.相对于基于代码覆盖的安全性选择技术,本文提
出的 3 种测试选择技术在缩减测试集合规模上有明显的优势,并提升了测试选择的精度以及精度和安全性的
综合指标.对于数据驱动的智能系统等偶然正确性现象发生概率高的软件,本文的方法可以更大程度上缩减测
试用例的数目,从而节省这类系统的测试开销.
References:
[1] Masri W, Podgurski A. Measuring the strength of information flows in programs. ACM Trans. on Software Engineering and
Methodology, 2009,19(2):5:1–5:33. [doi: 10.1145/1571629.1571631]
[2] Zhou XL, Wang HF, Zhao JH. A fault-localization approach based on the coincidental correctness probability. In: Proc. of the Int’l
Conf. on Software Quality, Reliability and Security. 2015. 292–297. [doi: 10.1109/QRS.2015.48]
[3] Masri W, Abou-Assi R. Cleansing test suites from coincidental correctness to enhance fault-localization. In: Proc. of the Int’l Conf.
on Software Testing, Verification, and Validation. 2010. 165–174. [doi: 10.1109/ICST.2010.22]
[4] Masri W, Abou-Assi R. Prevalence of coincidental correctness and mitigation of its impact on fault localization. ACM Trans. on
Software Engineering and Methodology, 2014,23(1):8:1–8:28. [doi: 10.1145/2559932]
[5] Zhou XL, Wang LZ, Li XD, Zhao JH. An empirical study on the test adequacy criterion based on coincidental correctness
probability. In: Proc. of the Int’l Conf. on Software Engineering and Knowledge Engineering, 2014. 632–635. [doi: 10.1145/
2020723.2020743]
[6] Rothermel G, Harrold MJ. A safe, efficient regression test selection technique. ACM Trans. on Software Engineering and
Methodology, 1997,6(2):173–210. [doi: 10.1145/248233.248262]
[7] Budd TA, Angluin D. Two notions of correctness and their relation to testing. Acta Informatica, 1982,18(1):31–45. [doi: 10.
1007/BF00625279]
[8] Hierons RM. Avoiding coincidental correctness in boundary value analysis. ACM Trans. on Software Engineering & Methodology,
2006,15(3):227–241. [doi: 10.1145/1151695.1151696]
[9] Daran M. Software error analysis: A real case study involving real faults and mutations. In: Proc. of the ACM SIGSOFT Int’l Symp.
on Software Testing and Analysis. 1996. 158–171. [doi: 10.1145/226295.226313]
[10] Voas JM. PIE: A dynamic failure-based technique. IEEE Trans. on Software Engineering, 1992,18(8):717–727. [doi: 10.1109/32.
153381]
[11] Ammann P, Offutt P. Introduction to Software Testing. Cambridge University Press, 2008.
[12] Denmat T, Ducasse M, Ridoux O. Data mining and crosschecking of execution traces: A re-interpretation of Jones, Harrold and
Stasko test information visualization. In: Proc. of the IEEE/ACM Int’l Conf. on Automated Software Engineering. 2005. 369–399.
[doi: 10.1145/1101908.1101979]
[13] Miao Y, Chen ZY, Li SH, Zhao ZH, Zhou YM. A clustering-based strategy to identify coincidental correctness in fault localization.
Int’l Journal of Software Engineering and Knowledge Engineering, 2013,23(5):721–741. [doi: 10.1142/S0218 194013500186]