Slide 11 / 55
Slide 11

Transcript

Here's what to put in your CLAUDE.md file - or in your subagent instructions - about tests.

Remember: humans are the bottleneck to test-driven development. Claude Code needs TDD so it doesn't need the whole program in context.

First, use pending tests. Mark tests with pytest.mark.xfail in Python, @Pending in Java, or test.todo in JavaScript. This lets you define the test suite before implementing features.

Second, if there's a web interface, include Selenium or Puppeteer. Get that tested early - frontend testing catches integration issues fast.

Third, emphasize red-green TDD. This helps Claude focus on the specific thing it's supposed to be developing right now.

One warning: Claude will occasionally alter a test and declare the feature complete. Watch for this and push back when it happens.