[2602.07900] Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents
-->
Computer Science > Software Engineering
arXiv:2602.07900 (cs)
[Submitted on 8 Feb 2026 (v1), last revised 9 Apr 2026 (this version, v2)]
Title:Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents
Authors:Zhi Chen, Zhensu Sun, Yuling Shi, Chao Peng, Xiaodong Gu, David Lo, Lingxiao Jiang<br>View a PDF of the paper titled Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents, by Zhi Chen and 6 other authors
View PDF<br>HTML (experimental)
Abstract: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, but the value of this behavior remains unclear. For example, GPT-5.2 writes almost no new tests yet achieves performance comparable to top-ranking this http URL raises a central question: do such tests meaningfully improve issue resolution, or do they mainly mimic a familiar software-development practice while consuming interaction budget?
To better understand the role of agent-written tests, we analyze trajectories produced by six strong LLMs on SWE-bench Verified. Our results show that test writing is common, but resolved and unresolved tasks within the same model exhibit similar test-writing frequencies. When tests are written, they mainly serve as observational feedback channels, with value-revealing print statements appearing much more often than assertion-based checks. Based on these insights, we perform a prompt-intervention study by revising the prompts used with four models to either increase or reduce test writing. The results suggest that prompt-induced changes in the volume of agent-written tests do not significantly change final outcomes in this setting. Taken together, these results suggest that current agent-written testing practices reshape process and cost more than final task outcomes.
Subjects:
Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
Cite as:<br>arXiv:2602.07900 [cs.SE]
(or<br>arXiv:2602.07900v2 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2602.07900
Focus to learn more
arXiv-issued DOI via DataCite
Submission history<br>From: Zhi Chen [view email]<br>[v1]<br>Sun, 8 Feb 2026 10:26:31 UTC (372 KB)
[v2]<br>Thu, 9 Apr 2026 13:23:28 UTC (1,239 KB)
Full-text links:<br>Access Paper:
View a PDF of the paper titled Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents, by Zhi Chen and 6 other authors<br>View PDF<br>HTML (experimental)<br>TeX Source
view license
Current browse context:
cs.SE
next >
new<br>recent<br>| 2026-02
Change to browse by:
cs<br>cs.AI
References & Citations
NASA ADS<br>Google Scholar
Semantic Scholar
export BibTeX citation<br>Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .
Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)