TDD & generative AI - a perfect pairing?
summary
Claim: generative AI can implement unit tests-first code if tests are run automatically. Built a JAR tool and a Maven plugin that sends a single test file to an LLM, writes/compiles/loads the returned Java, and runs JUnit 5; plain Java and Spring Boot demos succeed (some answers in ~8–10s, local LLM under 10s), tricky cases need retries or cloud models. Prototype takes 10–15 evenings to build, costs < $12 to explore, and uses test-driven generation with local LLM (Llama 3.1).
AI-written summary · about
chapters (23)
- 0:00Introduction
- 1:50Reverse TDD-AI workflow
- 2:32Three concepts
- 5:03Test driven generation
- 7:12Risks of trusting LLMs
- 8:14Happy flow and limits
- 9:19Choosing AI model
- 10:03Demo: odd even test
- 13:35Demo: prime numbers
- 15:19Manual steps challenges
- 16:23Building test generator
- 22:20Demo: automated tool
- 24:09Adding features via tests
- 27:27Tool self-testing
- 32:12Extending to libraries
- 33:39Demo: Spring Boot test
- 36:46Demo: age calculation
- 39:56Error handling and outputs
- 41:19Approach limitations
- 42:42Pricing and cost
- 44:06Future improvements
- 45:53Ideal endpoints
- 47:17Conclusion
related talks
47mTDD & Generative AI: A Perfect Pairing
46mTDD & generative AI - a perfect pairing?
45mTDD & generative AI - a perfect pairing?
46mGenerative AI: Say Goodbye to Deterministic Testing?
16mCan Test Driven Development be speeded up with Generative AI?
01h 02mReduce Developer Toil: Autonomous AI for Enterprise Testing @ Scale
21mLLM-Powered Unit Testing: Writing Reliable Java Tests with AI Assistance
01h 06mDoes GenAI Mean the Death of Test-Driven Development (TDD)
