paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Debugging the performance of Maven’s test isolation: experience report

调试 Maven 测试隔离的性能:经验报告
ISSTA Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis2020匹配度 1/10 · 该论文关注 Maven 测试隔离机制的进程间通信性能缺陷与修复,属于构建系统/测试执行的软件工程经验报告,与静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析均无直接关联。仅在“工业界落地”和“问题驱动”偏好上有非常微弱的交集。引用 16 inbox
Pengyu Nie, Ahmet Celik, Matthew Coley, Aleksandar Milicevic, Jonathan Bell, Milos Gligoric
crossref: 2026-09-12

AI 速览

一句话:通过分析测试隔离进程间通信机制,定位并修复 Maven 测试执行中的性能缺陷,使单测试平均提速约 350 毫秒。

可靠测试常通过将每个测试作为独立进程运行来避免测试顺序依赖和共享状态污染,但这会带来显著开销。本文是经验报告,旨在理解这些开销的来源,并构建系统以确认可能的最小开销。作者发现不同构建系统使用不同的进程间通信机制,这一设计选择会导致测试执行速度差异。由此他们发现 Apache Maven 测试运行代码中存在显著性能缺陷:与 Ant 相比,每个测试平均慢约 350 毫秒。该缺陷在真实项目中会显著增加测试时间。作者提交的补丁已被 Maven 集成,并继续改进 Maven 的测试执行工具。

问题
可靠测试中按独立进程隔离每个测试会引入显著性能开销,作者希望理解其来源并确认最小开销。
方法
通过经验报告形式比较不同构建系统的测试进程间通信机制,并构建系统以确认可能的最小开销,进而定位 Maven 测试执行中的性能问题。
评估
在真实项目中对比 Maven 与 Ant 的测试执行性能,发现 Maven 每个测试平均慢约 350 毫秒;补丁被 Apache Maven 集成。
原文摘要(Abstract)

Testing is the most common approach used in industry for checking software correctness. Developers frequently practice reliable testing-executing individual tests in isolation from each other-to avoid test failures caused by test-order dependencies and shared state pollution (e.g., when tests mutate static fields). A common way of doing this is by running each test as a separate process. Unfortunately, this is known to introduce substantial overhead. This experience report describes our efforts to better understand the sources of this overhead and to create a system to confirm the minimal overhead possible. We found that different build systems use different mechanisms for communicating between these multiple processes, and that because of this design decision, running tests with some build systems could be faster than with others. Through this inquiry we discovered a significant performance bug in Apache Maven’s test running code, which slowed down test execution by on average 350 milliseconds per-test when compared to a competing build system, Ant. When used for testing real projects, this can result in a significant reduction in testing time. We submitted a patch for this bug which has been integrated into the Apache Maven build system, and describe our ongoing efforts to improve Maven’s test execution tooling.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6036,
  title = {Debugging the performance of Maven’s test isolation: experience report},
  author = {Pengyu Nie and Ahmet Celik and Matthew Coley and Aleksandar Milicevic and Jonathan Bell and Milos Gligoric},
  booktitle = {ISSTA},
  year = {2020},
  doi = {10.1145/3395363.3397381}
}