一句话:提出 TDDev,自动化验收测试与失败驱动修复,首次系统研究全栈 Web 应用生成中的 TDD。
编码智能体能生成可运行的 Web 应用,但常不满足功能需求。将 TDD 用于 Web 应用需自动推导可执行验收测试、通过浏览器动态验证行为,并把失败转化为可操作反馈。本文提出实验工具 TDDev 自动化上述任务,实现最小人工介入的闭环 TDD,并在 20 个全栈 Web 应用、多个基座模型、两种编码智能体与三种 TDD 实现上开展首个受控研究。结果表明:基座能力足够时准确率提升 15.5–23.7 个百分点,对简约与全功能智能体均有效;以更可靠的测试器替换不可靠反馈可使低能力基座恢复正收益。Incremental TDD 提供有界控制,Whole-Project TDD 支持协调修复并在多数配置下成本效率最高,Agentic TDD 在高能力模型上最佳。作者据此给出选择实现方式的决策树,并说明 TDDev 可减少人工测试与干预。
Coding agents can generate runnable web applications, but their outputs frequently fail to satisfy functional requirements. Although test-driven development (TDD) offers a principled repair loop, applying it to web applications requires deriving executable acceptance tests, validating behavior through dynamic browser interactions, and translating observed failures into actionable feedback. We present TDDev, an experimental instrument that automates these tasks and enables closed-loop TDD with minimal human mediation. Using TDDev, we conduct the first controlled study of TDD for full-stack web application generation across 20 diverse web applications, multiple backbone models, two coding agents, and three TDD implementations. With sufficiently capable backbones, TDD improves accuracy by 15.5-23.7 percentage points and remains effective across both minimal and full-featured coding agents; replacing unreliable feedback with a stronger tester restores positive gains for a lower-capability backbone. Incremental TDD provides bounded control, Whole-Project TDD enables coordinated repair and achieves the highest cost efficiency in most configurations, and Agentic TDD performs best with highly capable models. Based on these findings, we provide a practical decision tree that selects an implementation according to model capability, feedback reliability, and deployment objectives. By automating acceptance testing and failure-guided repair, TDDev also reduces the human testing and intervention required during development.
@inproceedings{paperbot12571,
title = {From Runnable Code to Shippable Applications: Test-Driven Development for Full-Stack Web Application Generation},
author = {Yuxuan Wan and Tingshuo Liang and Jiakai Xu and Jingyu Xiao and Yintong Huo and Michael R. Lyu},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834388}
}