The TDD mantra is short and clear: Red, Green, Refactor. But it is hard to really get good at it. Most beginners start test driving the code through the low level unit tests. It is easy to learn and understand. This technique is known as inside-out or bottom-up. However, the outside-in approach gives us the chance to pay closer attention to business requirements, making sure we only implement what is necessary for the user story to be done, nothing more.
The notion of test is replaced by the notion of behavior.
We start the implementation of the story by writing executable examples that express the business’ needs (what should be done) without any implementation detail. For every high level example there might be several low level details that we will find and test drive from the outside in.
To be productive in going outside-in, it is essential to understand test doubles (especially mocks, stubs and spies), not only to drive the design but to avoid maintenance problems. It is also important to know and respect the SOLID design principles.
This practical tutorial will cover these aspects among others like architecture and its relation to the emergent design.
Some experience with TDD is necessary.
There will be very little theory and a lot of practice. The best way to learn is to solve the problems oneself with the supervision and the help of an expert guide.
During the tutorial people will work in pairs and iterations, getting the chance to work with a different person on every iteration.
Carlos started using computers at 6, when his father bought a PC with the Intel 8086 and some books on the Basic programming language. Since then, he has been learning how machines can be used to build a better world. He started earning money by writing software back in 2000.
In 2008 Carlos started using TDD for pretty much every piece of software he needed to write. In 2010 he published the first book on TDD in the Spanish language. In the last three years he has been training developers in several countries, and writing code with them. Apart from that, he has been investing his time and money in several web start-ups, always applying what he teaches to his own crafted software.