Test driven development (TDD) is a software development technique based on repeating very short development cycles: first a test is written to cover the change desired, then code is written to pass the test, and finally the new code is refactored to meet the appropriate standards. Kent Beck, considered the inventor of the technique, argued in 2003 that development through testing encourages simple design and inspires confidence.
TDD is an extreme programming technique, where you need to get a result that works. The programming technique starts with writing tests for a programme or module and then the programme itself.