一句话:提出重构感知的回归测试选择思路,避免将行为保持的重构视为影响测试的变更,从而减少不必要的测试执行。
回归测试用于确认新的代码改动不会破坏已有功能,但在改动频繁时开销很大。回归测试选择(RTS)通过只运行结果可能受改动影响的测试来降低开销:传统做法为每个测试收集依赖(如文件级依赖),在新版本中跳过依赖未发生变化的测试。然而,现有 RTS 技术不区分行为保持的变换(即重构)与其他代码改动,会把重构也当作可能影响测试的变更,导致测试被过度执行。本文面向这一问题,探索重构感知的回归测试选择,其核心思想是在选择测试时识别并排除重构这类语义等价变换,使测试只需针对真正可能改变行为的改动运行,从而在保持回归测试有效性的同时进一步削减测试成本。摘要未给出具体的实现与实验评估细节。
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.
DOI 原文 ·
@inproceedings{paperbot4473,
title = {Towards refactoring-aware regression test selection},
author = {Kaiyuan Wang and Chenguang Zhu and Ahmet Celik and Jongwook Kim and Don Batory and Milos Gligoric},
booktitle = {ICSE},
year = {2018},
doi = {10.1145/3180155.3180254}
}