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

关于使用EvoSuite进行模块化测试的有效性

On the Effectiveness of Modular Testing with EvoSuite

Bryn Mawr College(布林茅尔学院)

Elizabeth Dinella

AI总结:

本文探讨了Java面向对象程序中模块化随机测试的有效性,提出emote改进方法,通过放松限制提升目标方法的分支覆盖率。

摘要:

本文探讨了Java面向对象程序中模块化随机测试的有效性。模块化测试涉及单独测试程序的各个组件。通常,为了有效生成测试用例,必须包含一系列非目标设置调用以获得高覆盖率。在本文中,我们评估并改进了使用EvoSuite测试生成器的模块化测试。我们发现,由于严格限制不允许调用非目标设置方法,EvoSuite的模块化测试模式效果不佳,往往导致低分支覆盖率。我们提出emote(使用EvoSuite的高效模块化测试):一种改进EvoSuite的方法,允许在测试前缀中包含非目标方法。此修改借鉴了开发者编写的模糊驱动程序,通常在测试目标方法前调用设置方法以正确初始化状态。为确保有意义的测试生成,我们修改了EvoSuite的适应度函数,使其关注源自目标方法的调用链的分支覆盖率贡献。emote在SF100基准集的子集上进行了评估,显示目标方法的覆盖率提高了15.15%。

英文摘要:

This paper explores the effectiveness of modular randomized testing for object oriented programs in Java. Modular testing involves testing individual components of a program in isolation. Often times, for effective test generation, a series of non-target setup calls must be included to obtain high coverage of the target component. In this work, we evaluate and improve modular testing with the EvoSuite test generator. We find that due to strict restrictions that disallow calls to non-target setup methods, EvoSuite's modular testing mode is ineffective and often results in low branch coverage. We propose \textsc{emote} (Effective Modular Testing with EvoSuite): an enhancement to EvoSuite that relaxes this restriction, allowing non-target methods to be included in the test prefixes. This modification draws inspiration from developer-written fuzz drivers, which often invoke setup methods to properly initialize the state before testing the target method. To ensure meaningful test generation, we modify EvoSuite's fitness function to focus branch coverage contributions on the call chain originating from the target method. \textsc{emote} is evaluated on a subset of the SF100 benchmark, showing a 15.15\% improvement in coverage of the target methods.

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

↑