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

编码智能体能否编写并转译单元测试

Can Coding Agents Write and Transpile Unit Tests

Code Metal

Gil Pasternak, AJ Langley, Tom Yotam, Ellie Kitanidis

AI总结:

本研究考察三款采用原生前沿模型的编码智能体编写可靠测试及跨语言转译测试的能力,发现其测试覆盖率优于人类但质量随项目规模下降,测试转译仍不可靠。

摘要:

基于大语言模型(LLMs)构建的编码助手已成为现代软件开发的核心工具,人们愈发信任它们能执行工作流并端到端地实现代码现代化。这种信任很大程度上依赖于测试通过情况,而测试往往由编码智能体自身编写。在本研究中,我们考察这些智能体编写可靠测试以及在编程语言间转译测试的能力。我们对三款流行的编码智能体进行基准测试,每款均采用原生前沿模型并投入高推理算力。通过在广泛的指标套件上验证,我们发现编码智能体在传统覆盖率指标上远超人类编写的测试套件。然而,这种优势并不均衡:智能体编写的测试质量随项目规模增大而急剧下降,且大部分优势源于编写的测试数量更多。我们还表明,智能体的测试转译——尽管整体表现看似不错——仍存在不一致性且不可靠。

英文摘要:

Coding assistants built on Large Language Models (LLMs) have become a staple of modern software development, increasingly trusted to execute workflows and modernize code end-to-end. Much of this trust rests on passing tests, which are often written by the coding agents themselves. In this work, we examine the ability of these agents to both write reliable tests and translate them between programming languages. We benchmark three popular coding agents, each evaluated with a native frontier model and high reasoning effort. Verifying across a broad suite of metrics, we find that coding agents far exceed human written suites on traditional measures of coverage. This advantage, however, is uneven: agent test quality degrades sharply with project size, and much of the advantage lies in a greater number of written tests. We also show that agentic test translation---while seemingly strong in aggregate---remains inconsistent and unreliable.

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

↑