测试代码重构揭秘:它在何处以及如何影响测试代码质量与有效性?
Test Code Refactoring Unveiled: Where and How Does It Affect Test Code Quality and Effectiveness?
AI总结:
本文提出通过挖掘 GitHub 开源 Java 项目仓库,统计分析测试重构与质量指标、测试坏味道及覆盖率的关系,以揭示其对测试代码质量和有效性的影响。
摘要:
背景:过去,重构已在与生产代码质量相关的方面得到广泛研究,但对于开发者如何在测试代码上应用重构仍知之甚少。具体而言,目前仍缺乏关于开发者通常如何重构测试代码及其对测试代码质量和有效性影响的调查。目标:本文提出一项研究议程,旨在通过调查以下两点来弥合这一知识空白:(1)测试重构是否真正针对受质量和有效性问题影响的测试类;(2)重构在多大程度上有助于提升测试代码质量和有效性。方法:我们计划开展一项探索性的软件仓库挖掘研究,从 GitHub 收集开源 Java 项目的测试重构数据,并结合质量指标、测试坏味道以及代码/变异覆盖率指标对其进行统计分析。此外,我们将衡量重构操作如何影响测试代码的质量和有效性。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。