Manuscript Offprint

arXiv:2610.35297

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Roberto Milanese · Francesco Salzano · Hovhannes Muradyan · Jingjing Wu · Remo Pareschi · Fausto Fasano · Mattia Fazzini

Received: date / Accepted: date

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.

R. Milanese *

Politecnico di Torino, Turin, Italy

University of Molise, Campobasso, Italy

E-mail: roberto.milanese@polito.it

F. Salzano

University of Molise, Campobasso, Italy

E-mail: francesco.salzano@unimol.it

H. Muradyan

University of Minnesota, Minneapolis, USA

E-mail: murad031@umn.edu

J. Wu

University of Minnesota, Minneapolis, USA

E-mail: wu000295@umn.edu

R. Pareschi

University of Molise, Campobasso, Italy

E-mail: remo.pareschi@unimol.it

F. Fasano

University of Molise, Campobasso, Italy

E-mail: fausto.fasano@unimol.it

M. Fazzini

University of Minnesota, Minneapolis, USA

E-mail: mfazzini@umn.edu

Roberto Milanese et al.

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.

Keywords Coding agents · Pull requests · Software testing · Test smells · Code coverage · Mining software repositories

1 Introduction

AI-based coding tools have evolved from completing individual lines of code to carrying out entire development tasks: modern coding agents iterate over a task, invoking build systems, test frameworks, and version control until they consider it complete (Robbes et al., 2026b; Wang et al., 2025). In collaborative projects, the result usually reaches the code base as a pull request (PR) that developers review, revise, and integrate, and adoption has been rapid: as of February 2026, between 22.20% and 28.66% of the 128,018 active GitHub repositories analyzed by Robbes et al. (2026b) showed traces of coding agent use. We refer to PRs in which developers and coding agents both participate as agent-supported PRs, and to PRs without detectable agent involvement as human-authored PRs.

Testing is where the consequences of this shift are likely to last longest. Tests are read, modified, and deleted as the code they exercise evolves, and design problems in test code, known as test smells, make them harder to understand and change (Bavota et al., 2012); such problems are usually introduced when a test is first written and rarely removed afterwards (Tufano et al., 2016). As agents write tests that developers will then maintain, two questions become central: what kind of testing work agents take on, and what kind of test code results.

Research on agentic testing has grown quickly, but the evidence is fragmented. Studies of tests in real agentic PRs each focus on one aspect: test inclusion and evolution (Haque et al., 2026), test structure and coverage (Yoshi-moto et al., 2026), diff coverage and assertion quality (Alves and Teixeira, 2026), or test failures (Hoseinpour et al., 2026). Only some compare agentic with human contributions, and they pool them across repositories, at least in part, or analyze few projects one by one (Section 3). What is missing is a comparison over many repositories that estimates the difference within each of them, controls for the size of the contribution, and quantifies how much the difference varies between repositories. This matters because agent adoption is uneven across projects: a pooled comparison mixes whether agentic contributions test differently with which projects use agents, and, as we show, the second can hide and even reverse the first.

Our previous study (Milanese et al., 2026b) compared 6,582 agent-supported and 3,122 human-authored PRs from the AIDEV dataset (Li et al., 2025a) in four programming languages. It found that the two groups include tests at comparable rates (42.9% against 40.0%), but that agent-supported PRs devote a larger share of their changes to test code; that during co-evolution they more often add tests (OR 1.79), whereas human-authored PRs more often modify and delete existing ones; and that differences in test smells were negligible in magnitude. Its design, however, compared PRs pooled across repositories, classified changes at the level of test files, considered any PR that changes both test and production code as co-evolution, and did not measure coverage.

This paper addresses those limitations. First, we compare the two groups within repositories, using mixed-effects models in which each repository has its own baseline and its own difference between the groups, controlling for the size of the change. Second, we analyze test changes at the level of test methods and fixtures, and consider a test change as co-evolving only when it is linked to production code changed by the same PR (Marsavina et al., 2014); we also detect test smells with JNOSE (Virgínio et al., 2020), which locates each occurrence in a test method, so that smells can be compared both for entire contributions and for individual tests. Third, we add two dimensions: the structure of test code, extracted with HAMSTER (Pan et al., 2026), and code coverage, measured with JACOCO by executing each test suite before and after the PR. Since measuring coverage requires building each project, we restrict the study to Java, whose standardized build tools make this feasible at scale (Section 4.1).

These choices required a new dataset. We collected all PRs created and merged between January 1, 2025, and April 30, 2026, in Java repositories with traces of agent activity, identifying agent participation through PR-level and commit-level signals (Robbes et al., 2026c) for five widely adopted agents: Claude Code, Codex, Copilot, Cursor, and Devin. Retaining the repositories with at least ten PRs of each group, we obtain 18,375 agent-supported and 95,759 human-authored PRs from 391 repositories. On this dataset, we address five research questions (Section 4), which compare the two groups in the frequency and extent of testing (RQ1), the type and context of test changes (RQ2), the structure of test code (RQ3), test smells (RQ4), and code coverage (RQ5).

Roberto Milanese et al.

Our results lead to five main findings. First, how the comparison is made determines what it shows: pooled across repositories, the two groups change test code almost equally often (60.1% against 59.4%), whereas within the same repository and at equal size, the odds that an agent-supported PR changes test code are 1.65 times those of a human-authored one. Second, relative to human-authored PRs of the same size, agent-supported PRs add tests more often (OR 1.50-1.58) and modify (OR 0.70-0.76) and delete (OR 0.51-0.77) them less often, in every development context, while the two groups differ little in how often they co-evolve tests with production code (OR 1.12). Third, we detect no difference in most structural characteristics of the tests that agent-supported PRs add, except that they more often have an oracle (OR 1.71); when modifying tests, agent-supported PRs more often add assertions (OR 1.31). Fourth, the evidence on test smells is weaker: at the PR level, agent-supported PRs are associated with a smaller net increase in smells when adding tests and a larger one when modifying them, but both estimates are borderline and neither is reproduced for individual test methods. Fifth, we detect no difference in how well the two groups cover their production changes, but in test-only PRs the tests that agent-supported PRs contribute cover less of the classes they exercise (-11.1 percentage points), a result that rests on only 11 repositories with test-only PRs of both groups. For most outcomes, the size and sometimes the direction of the difference vary considerably between repositories.

In summary, this paper makes the following contributions:

– a dataset of 114,134 merged PRs from 391 Java repositories, each containing both agent-supported and human-authored PRs, in which agent participation is identified through multiple PR-level and commit-level signals for five coding agents;

– a within-repository comparison of testing in the two groups across 391 repositories, which controls for change size, estimates how much the difference varies between repositories, and shows that pooling contributions across projects can conceal or reverse it;

– an analysis of the same contributions along five testing dimensions, including test structure and coverage, with test changes classified at the level of test methods and linked to the production changes they accompany, and test smells compared at the level of contributions and of individual test methods;

– a replication package containing the dataset, the queries, and the analysis scripts (Milanese et al., 2026a).

The remainder of this paper is organized as follows. Section 2 introduces background on coding agents, testing in pull-request-based development, and test smells, and Section 3 discusses related work. Section 4 describes the study design. Section 5 reports the results, which Section 6 discusses together with the threats to validity. Section 7 concludes the paper and outlines future work.

References (59)