Skip to content
Conference

Understanding the Effect of Agentic Iteration on LLM-Based Unit Test Generation: A Comparison with Human-Written Tests Using Mutation Testing

Jul 2026 · 2026 IEEE 9th International Conference on Big Data and Artificial Intelligence (BDAI) · pp. 128-132 · 0 citations · 13 references

Abstract

Recent work argues that multi-agent LLM frameworks generate better unit tests than a single well-crafted prompt by iteratively refining coverage and cross-checking oracles. We test this claim directly on a 25-class Java system, comparing CANDOR, a multi-agent framework with JaCoCodriven coverage feedback and panel-based oracle review, against one-shot prompt test generation that submits to an LLM every source file and requirement of our example system in one request. We ran both strategies on GPT-4o and Gemini 2.5 Flash, and every resulting test suite is scored against a human-written baseline using PiTest (with 206 mutants). One-shot prompt outperforms CANDOR across the 25 classes combined: one-shot GPT-4o reaches a 69.90% mutation score versus CANDOR's 45.63%, and one-shot Gemini 2.5 Flash reaches 88.35% versus CANDOR's 35.92%. The one-shot prompt strategy ran on Gemini also surpasses the human baseline (83.98%) in about 45 seconds, while CANDOR with Gemini took roughly 50 hours. CANDOR's central problem is its Initialize stage: it considers the source of each class by itself. Consequently, it cannot reliably construct mocked dependency objects and can fail to produce tests that compile for classes with inter-class dependencies. Restricted to the classes it can handle, CANDOR's per-class mutation scores frequently match or beat the human baseline. Hence, CANDOR's weakness is architectural, not generative.

View source

Similar papers

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
Preprint Aug 2026

TDD-Agent: Test-Driven Reasoning for Code Generation

TDD-Agent is introduced, which operationalizes the test-driven development paradigm for code generation and improves not only code correctness but also the effectiveness of the generated tests, yielding higher pass rates, coverage, and mutation scores, suggesting that tests can serve as evolving reasoning artifacts rather than fixed validators.

Hong Yu, Ke-Fan Li, Jia-Kun Li et al. · 2 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 E. McClure, José Cambronero et al. · 0 citations
#artificial intelligence Preprint Sep 2026

KC-Bench: A Dynamic Interactive Benchmark for Evaluating Knowledge Conflicts in LLM Agents

As LLMs increasingly act through tools, they must reconcile user instructions, parametric knowledge, and dynamic environmental observations before taking actions. We introduce KC-Bench, a controlled multi-turn benchmark for measuring this capability across world-knowledge conflicts, input inconsistencies, and multi-source temporal conflicts. Its 238 tasks are manually screened from more than 1,000 generated candidates and combine a user simulator, stateful tools, deterministic environment assertions, an open-source natural-language evaluator, and human trajectory verification. Evaluation of nine models, including DeepSeek-V4-Flash, GLM-5.2, and MiniMax-M3, shows substantial cross-domain variation: no model handles factual correction, identity consistency checking, and temporal conflict resolution reliably across all settings. In the simulated environments, missed conflicts can propagate to tool calls or synthetic protected-data flows. KC-Bench isolates this model-level behavior rather than ranking complete agent frameworks, and provides a reproducible diagnostic for developing conflict-aware reasoning and execution safeguards.

Yaxing Lyu, Sheng-Jie Zhou, B. Toh et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.