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

Debugging the performance of Maven’s test isolation: experience report
复制标题

调试 Maven 测试隔离的性能:经验报告

DOI:
10.1145/3395363.3397381
复制
发表时间:
2020
期刊:
International Symposium on Software Testing and Analysis
影响因子:
--
通讯作者:
Gligoric, Milos
Gligoric, Milos
中科院分区:
--
文献类型:
--
作者:
Nie, Pengyu;Celik, Ahmet;Coley, Matthew;Milicevic, Aleksandar;Bell, Jonathan;Gligoric, Milos

文献摘要

参考文献

被引文献

相似文献

测试是工业中用于检查软件正确性的最常用方法。开发人员经常进行可靠的测试--彼此隔离地执行各个测试--以避免由测试顺序依赖性和共享状态污染(例如,当测试改变静态字段时)。一种常见的方法是将每个测试作为一个单独的过程运行。不幸的是,已知这会引入大量开销。这份经验报告描述了我们为更好地了解这种开销的来源和创建一个系统来确认尽可能最小的开销所做的努力。我们发现,不同的构建系统使用不同的机制来在这些多个进程之间进行通信,并且由于这种设计决策,使用某些构建系统运行测试可能比使用其他构建系统更快。通过这次调查,我们发现Apache Maven的测试运行代码中存在一个重大的性能缺陷,与竞争的构建系统Ant相比,该缺陷使每个测试的测试执行速度平均降低了350毫秒。当用于测试真实的项目时,这可以显著减少测试时间。我们为这个bug提交了一个补丁,它已经集成到Apache Maven构建系统中,并描述了我们正在努力改进Maven的测试执行工具。
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: 10.1007/s10664-017-9510-8
发表时间: 2017-04
影响因子: 4.1
作者:
C. Bezemer;Shane McIntosh;Bram Adams;D. Germán;A. Hassan
通讯作者: C. Bezemer;Shane McIntosh;Bram Adams;D. Germán;A. Hassan
点菜式构建系统
DOI: 10.1017/s0956796820000088
发表时间: 2018
影响因子: --
作者:
A. Mokhov;Neil Mitchell;Simon Peyton Jones
通讯作者: Simon Peyton Jones
通过隔离单元测试来查找错误
DOI: --
发表时间: 2011
期刊: ESEC/FSE '11
影响因子: --
作者:
Kivanç Muslu;B. Soran;Jochen Wuttke
通讯作者: Jochen Wuttke
具有动态依赖关系的健全且优化的增量构建系统
DOI: 10.1145/2814270.2814316
发表时间: 2015
期刊: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
影响因子: --
作者:
Sebastian Erdweg;Moritz Lichter;Manuel Weiel
通讯作者: Manuel Weiel
DOI: --
发表时间: 2002
期刊:
影响因子: --
作者:
Allan Heydon;R. Levin;T. Mann;Yuan Yu;Lytton Avenue
通讯作者: Lytton Avenue