arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.07782cs.SE
收藏

Java程序集成级测试影响分析方法

An approach for Test Impact Analysis on the Integration Level in Java programs

Muzammil Shahbaz

摘要:

测试影响分析是一种获取受代码更改影响的测试子集的方法。这种方法主要应用于单元测试,在这种测试中,代码和相关测试之间的联系很容易获得。然而,在集成级别上,通过编程找到这样的链接并不简单,特别是当集成测试保存在单独的存储库中时。我们提出了一种基于代码变化的运行时分析来选择集成测试的方法,以减少测试执行开销。我们提供了一组工具和框架,可以插入现有的CI/CD管道。我们已经评估了一系列的开源Java程序的方法,发现$\approx$ 50\%的测试减少,并在少数情况下超过80\%。我们还将该方法应用于生产中的大规模商业系统,并发现了类似的结果。

英文摘要:

Test Impact Analysis is an approach to obtain a subset of tests impacted by code changes. This approach is mainly applied to unit testing where the link between the code and its associated tests is easy to obtain. On the integration level, however, it is not straightforward to find such a link programmatically, especially when the integration tests are held into separate repositories. We propose an approach for selecting integration tests based on the runtime analysis of code changes to reduce the test execution overhead. We provide a set of tools and a framework that can be plugged into existing CI/CD pipelines. We have evaluated the approach on a range of open-source Java programs and found $\approx$50\% reduction in tests on average, and above 80\% in a few cases. We have also applied the approach to a large-scale commercial system in production and found similar results.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑