Ripensare il valore dei test generati da agenti per gli agenti di ingegneria del software basati su LLM
Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents
February 8, 2026
Autori: Zhi Chen, Zhensu Sun, Yuling Shi, Chao Peng, Xiaodong Gu, David Lo, Lingxiao Jiang
cs.AI
Abstract
I modelli linguistici di grandi dimensioni (LLM) agenti di codice risolvono sempre più problemi a livello di repository modificando iterativamente il codice, invocando strumenti e convalidando patch candidate. In questi flussi di lavoro, gli agenti spesso scrivono test al volo, un paradigma adottato da molti agenti di alto rango nella classifica SWE-bench. Tuttavia, osserviamo che GPT-5.2, che scrive quasi nessun nuovo test, può persino raggiungere prestazioni paragonabili agli agenti di primo rango. Ciò solleva la questione cruciale: se tali test migliorino significativamente la risoluzione dei problemi o si limitino a imitare le pratiche di testing umano consumando un budget di interazione sostanziale.
Per rivelare l'impatto dei test scritti dagli agenti, presentiamo uno studio empirico che analizza le traiettorie degli agenti su sei LLM all'avanguardia su SWE-bench Verified. I nostri risultati mostrano che, sebbene la scrittura di test sia comunemente adottata, i task risolti e non risolti all'interno dello stesso modello mostrano frequenze simili di scrittura di test. Inoltre, questi test servono tipicamente come canali di feedback osservazionale, dove gli agenti preferiscono in modo significativo istruzioni di stampa che rivelano valori rispetto a controlli formali basati su asserzioni. Sulla base di queste intuizioni, conduciamo un esperimento controllato revisionando i prompt di quattro agenti per aumentare o ridurre la scrittura di test. I risultati suggeriscono che cambiamenti nel volume dei test scritti dagli agenti non alterano significativamente gli esiti finali. Nel complesso, il nostro studio rivela che le attuali pratiche di scrittura di test potrebbero fornire un'utilità marginale nei compiti di ingegneria del software autonomi.
English
Large Language Model (LLM) code agents increasingly resolve repository-level issues by iteratively editing code, invoking tools, and validating candidate patches. In these workflows, agents often write tests on the fly, a paradigm adopted by many high-ranking agents on the SWE-bench leaderboard. However, we observe that GPT-5.2, which writes almost no new tests, can even achieve performance comparable to top-ranking agents. This raises the critical question: whether such tests meaningfully improve issue resolution or merely mimic human testing practices while consuming a substantial interaction budget.
To reveal the impact of agent-written tests, we present an empirical study that analyzes agent trajectories across six state-of-the-art LLMs on SWE-bench Verified. Our results show that while test writing is commonly adopted, but resolved and unresolved tasks within the same model exhibit similar test-writing frequencies Furthermore, these tests typically serve as observational feedback channels, where agents prefer value-revealing print statements significantly more than formal assertion-based checks. Based on these insights, we perform a controlled experiment by revising the prompts of four agents to either increase or reduce test writing. The results suggest that changes in the volume of agent-written tests do not significantly change final outcomes. Taken together, our study reveals that current test-writing practices may provide marginal utility in autonomous software engineering tasks.