要約
既存のコードからテストを生成することには多くの作業がありましたが、問題からテストを生成する作業は限られています。
正しいテストでは、問題を解決するコードパッチを検証する必要があります。
このペーパーでは、そのコードパッチがまだ存在しないシナリオに焦点を当てています。
そうすることで、2つの主要なユースケースがサポートされます。
まず、TDD(テスト駆動型開発)をサポートします。これは、「テスト最初に、後でコードを書き込む」という分野で、人間のソフトウェアエンジニアにとって十分に文書化された利点があります。
第二に、問題を解決するためのコードパッチを生成するSWE(ソフトウェアエンジニアリング)エージェントも検証します。
このペーパーでは、問題からテストを生成するためのベンチマークであるTDDベンチ検証と、このタスクのLLMベースのソリューションであるOtterを紹介します。
Otterは、ルールベースの分析でLLMを増強して出力を確認および修復し、新しい自己反射アクションプランナーを導入します。
実験は、問題からパッチを生成するシステムを強化することに加えて、問題からテストを生成するための最先端のシステムを上回るカワウソを示しています。
Otterは、開発者が問題を解決するのに生産性を高め、より堅牢でテストされたコードにつながるのに役立つことを願っています。
要約(オリジナル)
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-of-the-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.
arxiv情報
著者 | Toufique Ahmed,Jatin Ganhotra,Rangeet Pan,Avraham Shinnar,Saurabh Sinha,Martin Hirzel |
発行日 | 2025-05-30 17:25:04+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google