Towards refactoring-aware regression test selection
Towards refactoring-aware regression test selection
复制标题
走向重构意识回归测试选择
DOI:
10.1145/3180155.3180254
复制
发表时间:
2018
期刊:
影响因子:
--
通讯作者:
Gligoric, Milos
中科院分区:
文献类型:
--
作者:
Wang, Kaiyuan;Zhu, Chenguang;Celik, Ahmet;Kim, Jongwook;Batory, Don;Gligoric, Milos
Regression testing checks that recent project changes do not break previously working functionality. Although important, regression testing is costly when changes are frequent. Regression test selection (RTS) optimizes regression testing by running only tests whose results might be affected by a change. Traditionally, RTS collects dependencies (e.g., on files) for each test and skips the tests, at a new project revision, whose dependencies did not change. Existing RTS techniques do not differentiate behavior-preserving transformations (i.e., refactorings) from other code changes. As a result, tests are run more frequently than necessary.We present the first step towards a refactoring-aware RTS technique, dubbed Reks, which skips tests affected only by behavior-preserving changes. Reksdefines rules to update the test dependencies without running the tests. To ensure that Reksdoes not hide any bug introduced by the refactoring engines, we integrate Reksonly in the pre-submit testing phase, which happens on the developers' machines. We evaluate Reksby measuring the savings in the testing effort. Specifically, we reproduce 100 refactoring tasks performed by developers of 37 projects on GitHub. Our results show that Rekswould not run, on average, 33% of available tests (that would be run by a refactoring-unaware RTS technique). Additionally, we systematically run 27 refactoring types on ten projects. The results, based on 74,160 refactoring tasks, show that Rekswould not run, on average, 16% of tests (max: 97% and SD: 24%). Finally, our results show that the Reksupdate rules are efficient.