What is it?
Test Driven Development (TDD) is a software development process that relies on the repetition of a very short development cycle. Requirements are turned into test cases, where the software is developed to pass the tests. In other words, it creates a safety net that serves to keep the developer’s problems/bugs at bay while enabling the developer to refactor efficiently. This is opposed to software development that allows software to be added that is not proven to meet requirements.
Why use it?
- Allows developers to create smaller units of improvement as initially code should only aim to pass the tests
- Leads to more modular and flexible code as it will be developed in smaller independent units
- Faster feedback that can for example tell you whether your last change (or refactoring) has broken previously working codes
- Creates a detailed specification
- Wikipedia definition of Test Driven Development