Search⌘ K
AI Features

What is TDD Good For?

Learn to understand the purposes and benefits of test-driven development beyond code verification. Explore how TDD improves code structure, prevents regressions, aids documentation, and works alongside acceptance and quality assurance testing to ensure robust Ruby on Rails applications.

The uses of TDD

The primary purpose of test-driven development is to go beyond mere verification and use the tests to improve the code’s structure. That is, TDD is a software-development technique that masquerades as a code-verification tool.

Automated testing

Automated testing is a wonderful way of showing that the program does what the developer thinks it does, but it’s a poor way of showing that what the developer thinks is what the program actually should do. “But the tests pass!” is not likely to be comforting to a customer when the developer’s assumptions are just flat-out wrong. It’s a painful experience.

Automated tests are a poor way of showing what the program actually should do

Acceptance testing

The kinds of tests written in a TDD process are not ...