Otter: Generating Tests from Issues to Validate SWE Patches
Toufique Ahmed, Jatin Ganhotra, Rangeet Pan, Avraham Shinnar, Saurabh Sinha, Martin Hirzel
摘要
While there has been plenty of work on generating tests from existing code, there has been limited work on generating tests from issues. A correct test must validate the code patch that resolves the issue. This paper focuses on the scenario where that code patch does not yet exist. Doing so supports two major use-cases. First, it supports TDD (test-driven development), the discipline of "test first, write code later" that has well-documented benefits for human software engineers. Second, it also validates SWE (software engineering) agents, which generate code patches for resolving issues. This paper introduces TDD-Bench-Verified, a benchmark for generating tests from issues, and Otter, an LLM-based solution for this task. Otter augments LLMs with rule-based analysis to check and repair their outputs, and introduces a novel self-reflective action planner. Experiments show Otter outperforming state-ofthe-art systems for generating tests from issues, in addition to enhancing systems that generate patches from issues. We hope that Otter helps make developers more productive at resolving issues and leads to more robust, well-tested code.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents 引用了 CodeT: Code Generation with Generated Tests
- SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents 引用了 Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
- Comprehend, Imitate, and then Update: Unleashing the Power of LLMs in Test Suite Evolution 引用了 SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
- Comprehend, Imitate, and then Update: Unleashing the Power of LLMs in Test Suite Evolution 引用了 SWE-bench: Can Language Models Resolve Real-world Github Issues?
- Automated Generation of Issue-Reproducing Tests by Combining LLMs and Search-Based Testing 引用了 SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
- Automated Generation of Issue-Reproducing Tests by Combining LLMs and Search-Based Testing 引用了 SWE-bench: Can Language Models Resolve Real-world Github Issues?
- Automated Generation of Issue-Reproducing Tests by Combining LLMs and Search-Based Testing 引用了 Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
- iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation 引用了 SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
- iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation 引用了 SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation 引用了 Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection
- iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation 引用了 Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering 引用了 SWE-bench: Can Language Models Resolve Real-world Github Issues?
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering 引用了 Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
- Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection 引用了 SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
- Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection 引用了 CodeT: Code Generation with Generated Tests
- Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection 引用了 SWE-bench: Can Language Models Resolve Real-world Github Issues?
- Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection 引用了 SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection 引用了 Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
- Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction 引用了 CodeT: Code Generation with Generated Tests
- Compiling Large Multi-modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective 引用了 SWE-bench: Can Language Models Resolve Real-world Github Issues?
- Compiling Large Multi-modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective 引用了 SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- Compiling Large Multi-modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective 引用了 Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
引用它的顶会 Paper7
- Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and SelectionToufique Ahmed, Jatin Ganhotra, Avraham Shinnar, Martin HirzelICSE 2026 · 2 次引用
- Comprehend, Imitate, and then Update: Unleashing the Power of LLMs in Test Suite EvolutionTangzhi Xu, Jianhan Liu, Yuan Yao, Cong Li 等ASE 2025 · 1 次引用
- Automated Generation of Issue-Reproducing Tests by Combining LLMs and Search-Based TestingKonstantinos Kitsios, Marco Castelluccio, Alberto BacchelliASE 2025 · 1 次引用
- Compiling Large Multi-modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven PerspectiveWeiyu Kong, Yun Lin, Xiwen Teoh, Duc-Minh Nguyen 等ISSTA 2026 · 1 次引用
- iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test GenerationJunyi Wang, Jialun Cao, Zhongxin LiuFSE 2026
它引用的 Paper6
- SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao 等ICLR 2024 · 2,082 次引用
- SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret 等NeurIPS 2024 · 2,059 次引用
- SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code AgentsNiels Mündler, Mark Niklas Müller, Jingxuan He, Martin T. VechevNeurIPS 2024 · 172 次引用
- Large Language Models are Few-shot Testers: Exploring LLM-based General Bug ReproductionSungmin Kang, Juyeon Yoon, Shin YooICSE 2023 · 163 次引用
- CodeT: Code Generation with Generated TestsBei Chen, Fengji Zhang, Anh Nguyen, Daoguang Zan 等ICLR 2023 · 64 次引用
相关 Paper
- UTBoost: Rigorous Evaluation of Coding Agents on SWE-BenchBoxi Yu, Yuxuan Zhu, Pinjia He, Daniel KangACL 2025 · 20 次引用
- SWE-Swiss: A Multi-Task Fine-Tuning and RL Recipe for High-Performance Issue ResolutionZhenyu He, Qingping Yang, Wei Shen, Xiaojian Zhong 等ACL Findings 2026
- Test-Driven Development and LLM-based Code GenerationNoble Saji Mathews, Meiyappan NagappanASE 2024 · 15 次引用
- Can Agent Fix Agent Issues?Alfin Wijaya Rahardja, Junwei Liu, Weitong Chen, Zhenpeng Chen 等NeurIPS 2025 · 4 次引用
- Issue2Test: Generating Reproducing Test Cases from Issue ReportsNoor Nashid, Islem Bouzenia, Michael Pradel, Ali MesbahICSE 2026 · 1 次引用
