在 GitHub Actions 时代测试代码审查研究:一项复制研究
Test Code Review in the Era of GitHub Actions: A Replication Study
AI总结:
研究探讨 GitHub Actions 时代 PR 模式对测试代码审查的影响,发现 PR 模式比 Gerrit 更平衡测试与生产代码讨论,但 GHA 导致测试代码审查减少,引发对软件质量的担忧。
摘要:
测试代码在软件开发中不可或缺,确保生产代码的正确性并支持可维护性。然而,测试代码中的错误或遗漏可能掩盖生产缺陷。尽管代码审查广泛用于评估代码质量,但很少研究测试代码的审查方式。Spadini 等人在 Gerrit(预提交审查模型)上的研究发现,测试代码讨论显著少于生产代码。然而,目前最流行的审查模型基于拉取请求(PRs),其中贡献者提出更改供讨论和批准,比 Gerrit 更具可协商性和灵活性。此外,GitHub Actions(GHA)已成为自动化预检查和测试的常用工具,可能影响审查实践。这促使我们探讨 Spadini 等人的发现是否仍适用于 GHA 时代的 PR 模式。我们的工作复制并扩展了他们的研究。我们专注于 GitHub PRs,并分析了六个开源项目。我们研究了 PR 模式和 GHA 对测试代码审查的影响。我们的结果表明,GitHub 的 PR 模式比 Gerrit 更平衡测试和生产文件的讨论,尽管总体评论密度较低。然而,尽管跨项目异质性,GHA 的采用导致了向生产代码的明显转移。GHA 之后,涉及测试的 PR 中,审查概率和评论密度均达到中位数零。这些发现揭示了不断演进的持续集成管道如何边缘化测试代码审查。在 GHA 下观察到的测试中心讨论减少引发了对长期软件质量的担忧。我们的工作也提出了针对软件开发生命周期中相关方的建议。
英文摘要:
Test code is indispensable in software development, ensuring the correctness of production code and supporting maintainability. Nonetheless, errors or omissions in the test code can conceal production defects. While code review is widely adopted to assess code quality and correctness, little research has examined how test code is reviewed. Spadini et al.'s research on Gerrit (a pre-commit review model) found that test code receives significantly less discussion than production code. However, the most popular review model is currently based on pull requests (PRs), in which contributors propose changes for discussion and approval, a more negotiable and flexible model compared to Gerrit. Furthermore, GitHub Actions (GHA) has become widely used to automate pre-checks and testing, potentially impacting review practices. This leads us to explore whether Spadini et al.'s findings still hold for the PR model in the era of GHA? Our work replicates and extends their work. We focus on GitHub PRs and analyze six open-source projects. We investigate the impact of the PR model and GHA on test code review. Our results show that GitHub's PR model fosters more balanced discussions between test and production files than Gerrit, albeit with lower overall comment density. However, despite cross-project heterogeneity, GHA adoption triggered a sharp pivot toward production code. Post-GHA, for PRs involving tests, both review probability and comment density reached a median of zero. These findings reveal how evolving continuous integration pipelines can marginalize test code review. The observed decline in test-centric discussion under GHA warrants concern regarding long-term software quality. Our work also presents recommendations for stakeholders involved in the software development life cycle.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。