Testing with Coding Agents: A Large-Scale Comparison of Agent-Supported and Human-Authored Pull Requests
Roberto Milanese, Francesco Salzano, Hovhannes Muradyan, Jingjing Wu, Remo Pareschi, Fausto Fasano, Mattia Fazzini
Abstract
Context. Coding agents increasingly contribute tests through pull requests that developers then maintain, so how testing work is divided affects long-term maintainability. Objective. We compare pull requests in which developers and coding agents collaborate (agent-supported) with pull requests without detectable agent involvement (human-authored) along five dimensions: the frequency and extent of test changes, their type and context, test structure, test smells, and code coverage. Method. We analyze 114,134 pull requests merged between January 2025 and April 2026 in 391 Java repositories, identifying five coding agents through pull-request-level and commit-level signals. Since agent adoption varies across projects, we compare the two groups within repositories with mixed-effects models that control for change size. Results. Pooled across repositories, both groups change test code almost equally often; within repositories, the odds that an agent-supported pull request does so are 1.65 times higher. Agent-supported pull requests add tests more often (odds ratios 1.50-1.58) and modify (0.70-0.76) and delete (0.51-0.77) them less often. We detect no difference in most structural characteristics of the tests they add, which more often have an oracle, nor, in the 95 repositories we could build, in the coverage of their production changes; in test-only pull requests, however, their tests cover less of the code they exercise. Differences in test smells are borderline and not reproduced for individual test methods. Conclusions. Agent participation is associated with a different mix of testing work, which pooled comparisons across projects can hide or reverse; its relationship with test quality remains uncertain.
Create a lesson
Related papers
Do AI Coding Agents Write Infrastructure as Code Like Humans? An Empirical Study of GitHub Pull Requests
Shared title terminologycs.SEAmine Barrak, Emna Ksontini, Charles Wehbe
Code Cloning and Procedural Abstraction in Scratch: A Large-Scale Study of Co-Existing Reuse Practices
Shared title terminologycs.SERicardo Hidalgo-Aragon, Jesús Moreno-León, Alejandro Echaniz et al.
Barriers to GenAI Integration During Large-Scale Agile Transformation: An Exploratory Case Study
Shared title terminologycs.SENils Brede Moe, Marthe Berntzen, Astri Barbala et al.
Can Coding Agents Write and Transpile Unit Tests
Shared title terminologycs.SEGil Pasternak, AJ Langley, Tom Yotam et al.
Beyond Benchmarks: Evaluating Large Language Models and Agentic Patterns for Static Code Analysis Warning Classification
Shared title terminologycs.SELakmal Deshapriya, Sherlock A. Licorish, Brendon J. Woodford et al.
PR4Code: A Pull Requests Dataset for AI Code Generation
Shared title terminologycs.SEBenedetta Donato, Leonardo Mariani, Daniela Micucci et al.