arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2302.04547cs.SE
收藏

RICK:从生产数据生成模拟对象

RICK: Generating Mocks from Production Data

Deepika Tiwari, Martin Monperrus, Benoit Baudry

AI总结:

RICK通过观察生产环境中的应用程序运行,自动生成包含真实模拟对象和桩的单元测试,简化测试替身的实现过程。

摘要:

测试替身(如模拟对象和桩)是单元测试中的便捷夹具。它们允许开发者独立于系统内部或外部的其他组件来测试单个组件。然而,在测试中实现测试替身并不简单。通过本次演示,我们介绍了RICK,一种观察运行中应用程序以自动生成具有真实模拟对象和桩的测试的工具。RICK监控目标方法的调用及其与外部组件的交互。基于从这些观察中收集的数据,RICK生成带有模拟对象、桩以及基于模拟的预言(oracle)的单元测试。我们强调了RICK的能力,以及如何将其用于真实世界的Java应用程序,以生成带有模拟对象的测试。

英文摘要:

Test doubles, such as mocks and stubs, are nifty fixtures in unit tests. They allow developers to test individual components in isolation from others that lie within or outside of the system. However, implementing test doubles within tests is not straightforward. With this demonstration, we introduce RICK, a tool that observes executing applications in order to automatically generate tests with realistic mocks and stubs. RICK monitors the invocation of target methods and their interactions with external components. Based on the data collected from these observations, RICK produces unit tests with mocks, stubs, and mock-based oracles. We highlight the capabilities of RICK, and how it can be used with real-world Java applications, to generate tests with mocks.

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

↑