TDD or Test Driven Development is something that’s easy to talk about but harder to do and a lot harder to do well and get value from. Done with good judgement TDD can help produce excellent quality code that is resistant to bugs through the ability to validate a systems behaviour quickly and consistently through a complementary suite of tests written using a unit testing library. Code written to be unit testable from the outset requires more care in it’s structure and helps developers view their design decisions through the eyes of future maintainers. However all this does require effort and may stretch delivery lead time and in the early stages of a new product this could be undesirable.
Oliver Shaw went back to basics at Agile Yorkshire to explain the basics of TDD and the red, green, refactor workflow followed whiled writing code as well as the bigger picture value and gotchas of a large testing code base.