Перейти к содержимому

How I Test With Claude Code (AI TDD)

Owain Lewis

0:00 / 0:00

How I Test With Claude Code (AI TDD)

8 963 просмотра · 6 мес. назад
Owain Lewis
20 тыс. подписчиков
8 963 просмотра · 6 мес. назад
AI agents can write code fast, but without tests you have no way to know if that code actually works, or if it just broke something else in your codebase. In this video I show you exactly how I test code when working with AI agents. We build a real feature live using test-driven development and Claude Code, covering unit tests, integration tests, and browser-based end-to-end tests with Playwright. You'll see the full workflow from failing test to shipped feature. What's covered: Why tests are an AI agent superpower (and no tests is a liability) Test-after vs test-driven development with agents The red-green-refactor cycle applied to Claude Code Phase 1: unit tests for an auth service with pytest Phase 2: API integration tests against a real Postgres database Phase 4: browser-based end-to-end tests with Playwright Why you always need to review the tests an agent writes A real bug caught by switching test DB from SQLite to Postgres ⏱ Timestamps 0:00 Why testing matters for AI agents 1:47 Test-after vs test-driven development 2:36 Using a TDD skill with Claude Code 3:30 Demo: recruitment app walkthrough 5:07 The four testing phases 5:48 Phase 1: unit tests for the auth service 9:01 Why you must review the tests Claude writes 10:51 Phase 2: API integration tests 12:38 Switching from SQLite to Postgres (and catching a real bug) 14:43 Phase 4: end-to-end tests with Playwright 16:22 Final test run and recap 16:58 Final reflection 🔗 Resources Agent Skills: https://github.com/addyosmani/agent-s... My TDD skill: https://github.com/owainlewis/bluepri... Resources: https://github.com/owainlewis/youtube... 📰 Newsletter: https://newsletter.owainlewis.com 💬 Join the community: https://skool.com/aiengineer 👉 Need help with a project? Work with me: https://gradientwork.com