arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2610.14808cs.SE
收藏

Testuary:具备零样本并行性的智能体式测试生成工具

Testuary: Agentic Test Generation with Zero-Shot Parallelism

Johannes Gutenberg University Mainz(约翰内斯·古腾堡美因茨大学);paluno – The Ruhr Institute for Software Technology, University of Duisburg-Essen(杜伊斯堡-埃森大学鲁尔软件技术研究所)

Kevin Kammler, Dominik Sobania

AI总结:

Testuary是具备零样本并行性的智能体式测试生成工具,通过并行零样本生成、结构合并等技术优化测试套件,在覆盖率、突变分数等指标上显著优于现有基线方法,且效率更高。

摘要:

智能体式自动化测试生成方法可获得高质量结果,但它们会逐步改进给定的测试套件,因此薄弱的起点可能导致多次迭代或测试不足。为解决该问题,我们提出Testuary,为智能体阶段提供改进的起点。Testuary首先通过独立的并行零样本请求生成多个测试套件,对其进行确定性检查和修复,再通过一种新颖的结构合并方法将它们组合成单个套件。之后,运行时加权集合覆盖约简会移除冗余测试,且不会丢失覆盖的代码行、分支或已杀死的突变体。接着,两个智能体阶段针对剩余的覆盖范围和突变分数缺口进行优化。我们将Testuary与成熟的搜索式及基于大语言模型(LLM)的测试生成方法对比:仅非智能体的第一阶段就已显著优于当前最先进水平;经过智能体阶段后,Testuary平均实现99.9%以上的代码行和分支覆盖率,以及98.6%的突变分数,显著优于所有对比基线方法。Testuary所需的模型请求更少,且其测试套件平均规模更小、运行速度更快。

英文摘要:

Agentic approaches for automated test generation can reach high-quality results, but they improve a given test suite incrementally, so a weak starting point may lead to many iterations or insufficient tests. To address this, we present Testuary, which provides the agentic phases with an improved starting point. Testuary first generates multiple test suites through independent, parallel zero-shot requests, checks and repairs them deterministically, and combines them into a single suite with a novel structural merging approach. A runtime-weighted set-cover reduction removes redundant tests without losing covered lines, branches, or killed mutants. After that, two agentic phases target the remaining gaps in coverage and mutation score. We compare Testuary with established search and LLM-based test generation approaches. The non-agentic first phase alone already significantly outperforms the current state-of-the-art. After the agentic phases, Testuary achieves on average more than 99.9% line and branch coverage as well as a mutation score of 98.6%, significantly outperforming all compared baseline approaches. Testuary needs fewer model requests and its test suites are on average smaller and faster than those of the compared agentic approach.

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

↑