Testing with AI Agents: An Empirical Study of Test Generation Frequency, Quality, and Coverage
Suzuka Yoshimoto, Shun Fujita, Kosei Horikawa, Daniel Feitosa, Yutaro Kashiwa, Hajimu Iida

TL;DR
This empirical study analyzes how AI agents generate tests in real-world software development, revealing their frequency, structural characteristics, and impact on code coverage, demonstrating AI's effectiveness in augmenting testing practices.
Contribution
The paper provides the first comprehensive empirical analysis of AI-generated tests in real-world repositories, highlighting their structural features and coverage contributions.
Findings
AI authored 16.4% of test commits in repositories
AI-generated tests have longer code and more assertions
AI tests achieve coverage gains comparable to human tests
Abstract
Agent-based coding tools have transformed software development practices. Unlike prompt-based approaches that require developers to manually integrate generated code, these agent-based tools autonomously interact with repositories to create, modify, and execute code, including test generation. While many developers have adopted agent-based coding tools, little is known about how these tools generate tests in real-world development scenarios or how AI-generated tests compare to human-written ones. This study presents an empirical analysis of test generation by agent-based coding tools using the AIDev dataset. We extracted 2,232 commits containing test-related changes and investigated three aspects: the frequency of test additions, the structural characteristics of the generated tests, and their impact on code coverage. Our findings reveal that (i) AI authored 16.4% of all commits…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Techniques and Practices · Software Engineering Research
