When TDD needs help

TDD limitations

Test-driven development is helpful, but it won’t solve all of the development problems by itself. There are areas where developer testing doesn’t apply or doesn’t work very well.

Application behavior

As mentioned in one case already: developer tests are not very good at determining whether the application behaves correctly according to requirements. Strict TDD is not great at acceptance testing. There are, however, automated tools that try to tackle acceptance testing. The most prominent are Capybara and Cucumber; (see Integration Testing with Capybara and Cucumber). Acceptance testing can be integrated with TDD. We’ll sometimes see this called outside-in testing. That’s a perfectly valid and useful test paradigm, but it’s an extension of the classic TDD process.

Get hands-on with 1200+ tech skills courses.