Context. Refactoring has been widely investigated in the past in relation to production code quality, yet still little is known on how developers apply refactoring on test code. Specifically, there is still a lack of investigation into how developers typically refactor test code and its effects on test code quality and effectiveness. Objective. This paper presents a research agenda aimed to bridge this gap of knowledge by investigating (1) whether test refactoring actually targets test classes affected by quality and effectiveness concerns and (2) the extent to which refactoring contributes to the improvement of test code quality and effectiveness. Method. We plan to conduct an exploratory mining software repository study to collect test refactoring data of open-source Java projects from GitHub and statistically analyze them in combination with quality metrics, test smells, and code/mutation coverage indicators. Furthermore, we will measure how refactoring operations impact the quality and effectiveness of test code.
翻译:背景。过去,重构与生产代码质量的关系已被广泛研究,但关于开发者如何对测试代码实施重构仍知之甚少。具体而言,目前尚缺乏对开发者典型测试代码重构方式及其对测试代码质量与有效性影响的系统探究。目标。本文提出一项研究议程,旨在通过探究以下两个问题弥补这一认知空白:(1)测试重构是否实际针对存在质量与有效性问题的测试类;(2)重构在多大程度上促进测试代码质量与有效性的提升。方法。我们计划开展探索性软件仓库挖掘研究,从GitHub收集开源Java项目的测试重构数据,并结合质量指标、测试坏味、代码/变异覆盖率指标进行统计分析。此外,我们将测量重构操作对测试代码质量与有效性的具体影响。