Search arXiv⌕ Search

arXiv · 2610.02952

GTDD: Generative Test-Driven Development for AI Coding Agents with Adversarial Testing

Abstract

Test-driven development gives AI coding agents executable requirements for implementing software. Because these agents can adapt their implementations to the examples they observe, passing a predetermined collection of tests can leave substantial parts of the intended behavior unimplemented. We propose Generative Test-Driven Development (GTDD), a formulation of test-driven development in which a separate testing agent generates new inputs after each candidate implementation is fixed, using a human-specified behavioral contract and the feedback from earlier rounds. A trusted evaluator checks these inputs, returns reduced counterexamples to the coding agent, and saves them for regression testing, so development continually confronts failures beyond the initial examples. We characterize the evidence that this process provides through a finite-population analysis of false acceptance under adaptive candidate selection. The resulting bounds quantify how test visibility and repeated feedback affect acceptance, and show that fresh random audits after candidate commitment control false acceptance across development rounds. In a paired experiment on a stateful key-value store, both policies that regenerated tests during development ended with lower mean failure rates than the policy whose tests were generated once by the same language model, and giving the tester the candidate's source produced no detectable additional improvement. Further conditions requesting equal numbers of tests did not isolate any single feature of the policies as the source of this difference. GTDD combines this adaptive development feedback with established regression tests and an independent acceptance rule.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Masahiro Kato. 2026-10-02. GTDD: Generative Test-Driven Development for AI Coding Agents with Adversarial Testing. https://arxiv.org/abs/2610.02952

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

CodePori: Large-Scale System for Autonomous Software Development Using Multi-Agent Technology

Existing Large Language Model (LLM)-based multi-agent systems are capable of executing tasks and providing data-driven recommendations, thereby enabling automation and decision support that assist practitioners in software development. However, existing studies have evaluated agents' performance on benchmark datasets, offering only binary pass-or-fail results, which provide limited insight into their practical applicability. There remains a lack of empirical research examining the potential and limitations of LLM-based agents in addressing challenging, real-world tasks, such as automated code generation for software systems. To this end, this study conducted a survey to empirically investigate the potential of LLM-based agents in software development, with participants evaluating the agents' performance in autonomous software development tasks. We employed a two-phase approach comprising (i) the development of a multi-agent system, CodePori, to automate code generation, and (ii) a survey-based evaluation to assess agent performance and explore its practical applicability to software development. Our results highlight that, while LLM-based multi-agent systems show potential for autonomous code generation, their successful integration requires addressing specific challenges (e.g., short-term memory limitations, hallucinations, and code smells) and incorporating a practitioner-centric perspective. The study also highlights the need to move beyond standard benchmarks for evaluating real-world applicability and identifies new opportunities for broader adoption in both industry and academia.

cs.SE↗

SCLA: Automated Smart Contract Summarization via LLMs and Control Flow Prompt

Smart contract code summarization is crucial for efficient maintenance and vulnerability mitigation. While many studies use Large Language Models (LLMs) for summarization, their performance still falls short compared to fine-tuned models like CodeT5+ and CodeBERT. Some approaches combine LLMs with data flow analysis but fail to fully capture the hierarchy and control structures of the code, leading to information loss and degraded summarization quality. We propose SCLA, an LLM-based method that enhances summarization by integrating a Control Flow Graph (CFG) and semantic facts from the code's control flow into a semantically enriched prompt. SCLA uses a control flow extraction algorithm to derive control flows from semantic nodes in the Abstract Syntax Tree (AST) and constructs the corresponding CFG. Code semantic facts refer to both explicit and implicit information within the AST that is relevant to smart contracts. This method enables LLMs to better capture the structural and contextual dependencies of the code. We validate the effectiveness of SCLA through comprehensive experiments on a dataset of 40,000 real-world smart contracts. The experiment shows that SCLA significantly improves summarization quality, outperforming the SOTA baselines with improvements of 26.7%, 23.2%, 16.7%, and 14.7% in BLEU-4, METEOR, ROUGE-L, and BLEURT scores, respectively.

cs.SE↗

Generalizing GUI Tests into Voice Assistant Capabilities through Behavioral Variation Discovery

Voice Assistants (VAs) and agentic assistants increasingly support app-specific tasks through natural-language interaction. However, these capabilities still require app-specific execution logic. Existing approaches either derive this logic dynamically from GUI context, require developers to define app functions, or reuse GUI tests that remain tied to a single concrete task instance. To address this limitation, we propose Test2VA, an approach that generalizes existing GUI tests into reusable app-specific VA capabilities. Test2VA adopts mutation as an exploration mechanism to discover plausible behavioral variations of test interactions, dynamically validates these variations on the running application with adapted assertions, and generalizes the validated task instances into capabilities that preserve the common task pattern while supporting broader user requests. We evaluate Test2VA on 100 Espresso GUI tests from ten real-world Android applications, covering 407 GUI events and 115 assertions. Across 396 reproduced events, Test2VA reduces 18,999 available mutation candidates to 1,272 predicted candidates before dynamic validation, identifies mutable events with 83.33% precision, 87.79% recall, and an 85.50% F1 score, and generates 65 VA capabilities. Among them, 64 execute successfully and 56 satisfy our capability quality requirements. We further analyze unsuccessful and low-quality cases to identify common causes of failure. Finally, we conduct a user study with 18 participants and 150 task observations to evaluate the generated capabilities in real app tasks. The VA successfully completes 123 observations, achieving an overall success rate of 82.0%, and 16 of 18 participants rate the VA as useful or very useful. These results show the feasibility of generalizing test-derived task logic into reusable app-specific VA capabilities.

cs.SE↗