# Do Autonomous Agents Contribute Test Code? A Study of Tests in Agentic Pull Requests

arXiv: https://arxiv.org/abs/2601.03556 · HTML: https://mlsanity.com/paper/2601.03556/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use.
- Builds on 3 of its 22 references that are in the map.
- First posted on arXiv 7 Jan 2026.

## Placed in

- LLM agents and tool use / [Software engineering coding agents](https://mlsanity.com/agents/software-engineering-coding-agents/)

## Builds on (most cited first, 3 of 3)

- [Automated Unit Test Improvement using Large Language Models at Meta](https://mlsanity.com/paper/2402.09171/) (2024)
- [Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Tools](https://mlsanity.com/paper/2312.10622/) (2023)
- [Hamster: A Large-Scale Study and Characterization of Developer-Written Tests](https://mlsanity.com/paper/2509.26204/) (2025)

## Built on by (most cited first, 4 of 4)

- [To What Extent Does Agent-generated Code Require Maintenance? An Empirical Study](https://mlsanity.com/paper/2605.06464/) (2026)
- [AIRA: AI-Induced Risk Audit: A Structured Inspection Framework for AI-Generated Code](https://mlsanity.com/paper/2604.17587/) (2026)
- [Do These Violent Delights Have Violent Ends? Measuring the Post-Merge Fate of Agentic Code](https://mlsanity.com/paper/2607.09902/) (2026)
- [Trust but Verify? Uncovering the Security Debt of Autonomous Coding Agents](https://mlsanity.com/paper/2607.12428/) (2026)

## Abstract (arXiv)

Testing is a critical practice for ensuring software correctness and long-term maintainability. As agentic coding tools increasingly submit pull requests (PRs), it becomes essential to understand how testing appears in these agent-driven workflows. Using the AIDev dataset, we present an empirical study of test inclusion in agentic pull requests. We examine how often tests are included, when they are introduced during the PR lifecycle and how test-containing PRs differ from non-test PRs in terms of size, turnaround time, and merge outcomes. Across agents, test-containing PRs are more common over time and tend to be larger and take longer to complete, while merge rates remain largely similar. We also observe variation across agents in both test adoption and the balance between test and production code within test PRs. Our findings provide a descriptive view of testing behavior in agentic pull requests and offer empirical grounding for future studies of autonomous software development.
