This paper introduces TDDev, the first Test-Driven Development (TDD)-enabled LLM agent framework that generates fully functional full-stack web applications from visual input. Taking natural language descriptions or design images as input, TDDev automatically derives executable test cases, generates front-end and back-end code, simulates user interactions, and iteratively improves the implementation until all requirements are met. This approach overcomes the limitations of language models and addresses a key challenge in full-stack automation. Through extensive experiments across a variety of application scenarios, TDDev achieves a 14.4% accuracy improvement over state-of-the-art baselines.