Unit testing is one of the most established quality-assurance techniques for software development. One major advantage of unit testing is the adjustable trade-off between efficiency (i.e., testing effort) and effectiveness (i.e., fault-detection probability). To this end, various strategies have been proposed to exploit this trade-off. In particular, test-suite reduction (TSR) reduces the number of (presumably redundant) test cases while testing a single program version. Regression-test selection (RTS) selects test cases for testing consecutive program revisions. However, both TSR and RTS may influence -- or even obstruct -- each others' performance when used in combination. For instance, test cases discarded during TSR for a particular program version may become relevant again for RTS. However, finding a combination of both strategies leading to a reasonable trade-off throughout the version history of a program is an open question. The goal of this paper is to gain a better understanding of the interactions between TSR and RTS with respect to efficiency and effectiveness. To this end, we present a configurable framework called RegreTS for automated unit-testing of C programs. The framework comprises different strategies for TSR and RTS and possible combinations thereof. We apply this framework to a collection of subject systems, delivering several crucial insights. First, TSR has almost always a negative impact on the effectiveness of RTS, yet a positive impact on efficiency. Second, test cases revealing to testers the effect of program modifications between consecutive program versions are far more effective than test cases simply covering modified code parts, yet causing much more testing effort.
翻译:单位测试是软件开发最公认的质量保证技术之一。单位测试的一个主要优势是效率(即测试努力)和有效性(即检测错误概率)之间的可调整权衡取舍(即检测失败概率)和有效性(即检测失败概率)之间的可调整权衡取舍。为此,提出了各种战略以利用这一权衡取舍,特别是,测试适配减少(TSR)在测试单一程序版本时减少测试案例的数量(估计是多余的),回溯测试选择(RTS)选择测试案例,以测试连续方案修改。然而,TRS和RTS的测试案例在合并使用时,可能会影响 -- -- 甚至阻碍 -- -- 各自的业绩。例如,在特定程序版本的TSR测试中丢弃的测试案例可能再次与RTS有关。然而,在程序版本的整个版本中找到导致合理交易的两种战略组合是一个尚未解决的问题。本文件的目的是更好地了解TRS和RTS在效率和有效性方面的反向下测试案例之间的反向互动关系。为此,我们提出了一个名为Reget-TS的快速测试程序在自动测试程序中几乎都使用一个至关重要的测试框架。