跳到正文
返回论文列表
cs.SE提交于 已译

基准测试 LLM 智能体基于软件需求的行为充分测试生成

Benchmarking LLM Agents for Behaviorally Adequate Test Generation from Software Requirements

Binhang Qi · Yiming Liu · Yun Lin · Yangjie Zhou · Hailong Sun · Jin Song Dong

中文摘要

随着大语言模型智能体将自然语言需求编译为代码,需求到测试的生成变得至关重要。现有基准多关注白盒测试,缺乏对语义对齐的评估。本文引入 Req2Test-Bench,包含从 8 个开源项目中恢复的 5,086 个执行验证实例,涵盖 5 种编程语言和 4 种 BDD 框架。每个实例配对 Gherkin 需求与开发者编写的测试实现。评估 8 种智能体-模型-推理配置发现,执行成功率与行为充分性(以 kill-completeness 衡量)存在显著差距。最佳配置 Codex 搭配 DeepSeek-V4.1-Flash 在 82.8% 的实例上生成通过测试,但仅 33.8% 行为充分。研究发现:扩大智能体规模在行为充分性上收益递减;需求规格不足导致信息缺口;基于需求的测试框架是改进方向。

关键要点

  1. 01现有测试生成基准多聚焦白盒测试,缺乏对需求与生成测试间语义对齐的评估。
  2. 02提出 Req2Test-Bench 基准,包含 5,086 个来自 8 个开源项目的执行验证实例。
  3. 03评估显示执行成功率与行为充分性存在巨大差距,最佳配置仅 33.8% 行为充分。
  4. 04扩大智能体规模在行为充分性上收益递减,需求规格不足是主要信息缺口来源。

解读

尚无解读。

原始英文摘要

arXiv:2610.36584v1 Announce Type: cross Abstract: As large language model agents increasingly compile natural-language requirements into repository-level code, requirement-to-test generation grows in importance to provide validation constraints (or harness) to guide code generation. Yet it remains unclear whether current agents can generate tests that validate the required behavior when the implementation of that behavior is withheld. Existing test-generation benchmarks mostly focus on white-box testing, whereas the requirement--test-related study usually requires evaluation on semantic alignment between the given documents and the generated tests. We introduce Req2Test-Bench, a benchmark containing 5,086 execution-validated instances recovered from developer-authored behavior-driven development (BDD) artifacts in 8 open-source projects, spanning 5 programming languages and 4 BDD frameworks. Each instance pairs a natural-language requirement in Gherkin with its developer-written Test Implementation. Given the requirement, target interfaces of the required behavior, an agent must generate a complete, potentially multi-file Test Implementation. Evaluation of 8 agent--model--reasoning configurations reveals a substantial gap between execution success and behavioral adequacy, which is measured strictly as kill-completeness: a kill-complete test kills every mutant that the ground-truth test kills. The best-performing configuration, Codex with DeepSeek-V4.1-Flash, produces passing tests for 82.8% of instances, yet only 33.8% are behaviorally adequate. We find that (1) scaling up agents yields sharply diminishing returns in behavioral adequacy relative to generation cost; (2) under-specified requirements cause the information gap, including ambiguous setup and implicit expected outcomes; and (3) requirement-grounded harnesses that steer agent non-determinism offer a promising direction for improvement.

同方向论文 · cs.SE

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联提示词 · 6

编程tech.qimao.com·外部收录·

按规范检查 Go 代码改动,分析问题与服务影响并生成 Code Review 报告

``` # Code Review 规范 你是 golang 编程的专家,现在对代码进行 Code Review,请按照以下步骤进行: (若遇到 git 命令分页的情况,请加上`| cat`) ## 步骤一:代码规范检查 - [ ] 是否遵循最佳实践 @.cursor/rules/rule-code-spec.mdc - [ ] 是否存在重复代码 - [ ] 是否有充分的注释和文档 - [ ] 是否易于理解和维护 ## 步骤二:功能问题分析 - [ ] 分析本次代码改动的影响…

编程zhuanlan.zhihu.com·外部收录·

用于指导 Claude Code 按阶段规划、测试驱动实现、重构并提交代码。

### 1. 规划与分阶段 将复杂的工作分解为 3-5 个阶段。在 `IMPLEMENTATION_PLAN.md` 中记录: ```text ## 阶段 N: [Name] **目标**: [具体可交付成果] **成功标准**: [可测试的结果] **测试**: [具体的测试用例] **状态**: [未开始|进行中|已完成] ``` * 随着进展更新状态 * 所有阶段完成后删除文件 ### 2. 实现流程 1. **理解** - 研究代码库中的现有模式 2. **测试**…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

VLSI asic design verification engineer

This is the job of the model Create a test pinch and Raman hotel minis verification test in Raymond for SBI from the scratch along with the design as well dispatched be in the uvm environment and also it is pinch is should be expendable wh…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

debug

Please debug the current codebase and implement a robust development plan to ensure the system is fully functional. Prioritize refactoring the application architecture to follow industry best practices, resolve existing build errors, and en…