Skip to content
Preprint

Tangent: An Empirical Study of Testing Practices for LLM-Based Agent Applications

Aug 2026 · 1 citation · 90 references
Computer Science

TL;DR

This paper constructs a large-scale dataset of agent applications, tools, and tests, and manually label 2,572 test methods from 240 modules, and derives a taxonomy of 23 testing patterns across test fixtures, data, objectives, and assertions, and characterize tests by level.

Abstract

Agents built on large language models (LLMs) are increasingly used to build applications that perform complex, multi-step tasks involving reasoning, tool use, and interaction with external environments. Despite rapid progress in benchmarking LLM-based agents, very few studies have attempted to understand how such systems are tested in practice. In particular, testing levels, objectives, data patterns, test complexity, and validation strategies for agent applications remain underexplored. In this paper, we present an empirical study of testing practices in LLM-based agent applications using a large corpus of mined open-source projects. We construct a large-scale dataset of agent applications, tools, and tests, and manually label 2,572 test methods from 240 modules. From this analysis, we derive a taxonomy of 23 testing patterns across test fixtures, data, objectives, and assertions, and characterize tests by level (unit, module, integration). We complement this with structured interviews of 10 senior industry practitioners building agentic systems. Our results show that testing of LLM-based agent applications is dominated by narrowly scoped unit tests, with limited coverage of complex interactions, realistic scenarios, and non-functional requirements. Tests frequently rely on simplistic inputs, heavy mocking, and shallow validation, and agent-related tests exhibit low structural complexity. While industry practice places greater emphasis on non-functional testing than open-source projects, both reveal common gaps, including the lack of formal testing foundations, unclear test objectives, and challenges in generating high-quality test data. Based on these findings, we outline research directions toward more systematic and rigorous testing of agent applications, including foundations for agent testability, formalized test objectives, and fault-based testing techniques.

View source

Similar papers

Review Jul 2026

Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows

TestAgent is proposed, an LLM-based test generation approach that addresses the above limitations by emulating human testing practices via a multi-agent collaboration mechanism and equips TestAgent with a set of tool APIs that can be invoked dynamically in an on-demand and adaptive manner.

Quanjun Zhang, Ye Shang, Siqi Gu et al. · 0 citations
Preprint Aug 2026

Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation

It is shown that test suites generated by the spec-driven agent are superior to the baseline and human-authored tests in 77.8% and 56.7% of the cases, respectively, and demonstrated improvements on following best practices, readability, and edge-case coverage.

Michele Tufano, James McClure, José Cambronero et al. · 0 citations
Book Open access Jul 2026

Engineering Practices in Open-Source Agent Frameworks: A Large-Scale Empirical Study

A large-scale empirical study of mainstream open-source agent frameworks from an engineering perspective, providing empirical evidence linking framework design choices to engineering risks and highlighting the need for stronger guidance and support in agent framework development.

Yibo Zhai, Junjun Si, Yan Wang et al. · 0 citations
Book Open access Jul 2026

TestAgent: A Multi-Agent LLM Framework for Repository-Level Unit Test Generation

TestAgent, a multi-agent tool implemented as a VS Code extension that automates the generation of high-quality unit tests for Java projects using repository-level Code Knowledge Graphs, demonstrates its practical utility for regression testing and bug discovery.

Ye Shang, Quanjun Zhang, Zheng Zhan et al. · 0 citations
Conference Open access Jul 2026

AgentGym2: Benchmarking Large Language Model Agents in De-Idealized Real-World Environments

AgentGym2 is presented, a new evaluation framework with task instances grounded in real-world end-to-end working demands that measures agents'ability to execute end-to-end procedures, discover tools via exploration, compose tools for unseen tasks, and remain robust to noisy and underspecified information.

Zhiheng Xi, Dingwen Yang, Jiaqi Liu et al. · 1 citation
Open access Aug 2026

A Multi-Agent LLM Framework for Automated Software Testing

A multi-agent testing framework in which requirement analysis, test-case generation, sandboxed execution, and defect detection are delegated to four distinct agents, and in which detection rests on a composite rule combining the execution signal with the semantic judgment of a dedicated diagnostic agent.

Yuxuan Li · 0 citations