How does TDD help in building better software?
From the outset, Test-Driven Development seems like a lot more work. We could very well be doubling the size of our code base with a test for every single branch in our logic. Here's why all that extra code will be worth it:
- It will keep you on track: Writing the tests first is like keeping an executable checklist of all the development tasks you have to complete. Good functional tests are the key link between user stories (which is what everyone really cares about) and your code. A well-designed functional test will ensure that the end user will be able to do everything they need to do with your application.
- You will build exactly (and only) what is required: As we'll see in Chapter 2, Your First Test-Driven ...