TestSpark:IntelliJ IDEA 的终极测试生成伴侣
TestSpark: IntelliJ IDEA's Ultimate Test Generation Companion
AI总结:
本文提出 IntelliJ IDEA 插件 TestSpark,通过集成基于搜索的测试生成与大型语言模型反馈循环,使用户能在 IDE 内以最少操作生成、修改和运行单元测试,并支持以最小努力扩展新的测试生成方法。
摘要:
编写软件测试既费力又耗时。为解决这一问题,先前的研究引入了多种自动化测试生成技术。该领域中一个被充分探索的研究方向是单元测试生成,即利用人工智能(AI)技术为被测方法/类创建测试。虽然这些技术中的许多主要应用于研究场景,但现有工具(如 EvoSuite、Randoop 和 AthenaTest)并不用户友好,且仅针对单一技术定制。本文介绍了 TestSpark,一个用于 IntelliJ IDEA 的插件,使用户能够在其集成开发环境(IDE)内仅需几次点击即可直接生成单元测试。此外,TestSpark 还允许用户轻松修改和运行每个生成的测试,并将其集成到项目工作流中。TestSpark 利用了基于搜索的测试生成工具的进展,并引入了一种使用大型语言模型(LLMs)生成单元测试的技术,通过在 IDE 和 LLM 之间建立反馈循环来实现。由于 TestSpark 是一个开源(https://github.com/JetBrains-Research/TestSpark)、可扩展且文档完备的工具,因此可以以最小的努力将新的测试生成方法添加到该插件中。本文还解释了我们与 TestSpark 相关的未来研究以及我们的初步结果。演示视频:https://youtu.be/0F4PrxWfiXo
英文摘要:
Writing software tests is laborious and time-consuming. To address this, prior studies introduced various automated test-generation techniques. A well-explored research direction in this field is unit test generation, wherein artificial intelligence (AI) techniques create tests for a method/class under test. While many of these techniques have primarily found applications in a research context, existing tools (e.g., EvoSuite, Randoop, and AthenaTest) are not user-friendly and are tailored to a single technique. This paper introduces TestSpark, a plugin for IntelliJ IDEA that enables users to generate unit tests with only a few clicks directly within their Integrated Development Environment (IDE). Furthermore, TestSpark also allows users to easily modify and run each generated test and integrate them into the project workflow. TestSpark leverages the advances of search-based test generation tools, and it introduces a technique to generate unit tests using Large Language Models (LLMs) by creating a feedback cycle between the IDE and the LLM. Since TestSpark is an open-source (https://github.com/JetBrains-Research/TestSpark), extendable, and well-documented tool, it is possible to add new test generation methods into the plugin with the minimum effort. This paper also explains our future studies related to TestSpark and our preliminary results. Demo video: https://youtu.be/0F4PrxWfiXo
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。