Testing: Differences between TDD, ATDD and BDD
Test-Driven Development (TDD)

Test driven development revolves around using Unit Tests to test code, decoupling dependencies from the code (using techniques such as dependency injection).

Tests should be written before the code is written.

The TDD process involves writing Unit Tests before code is written. For the developer this means you must know the behaviour of the code before any particular algorithm is written to solve a problem. TDD asserts some conditions that may be the output of some particular function.

It also means that you need to write enough tests to cover al the paths through the code in question, this means we need to make sure that our code coverage is a good percentage of all of the lines of code we write.

The TDD process does not stop a developer refactoring code and maximising the efficiency of code that will go into production (far from it). As part of the usual code review process TDD also fits satisfactorily, and since you are arguably you are reviewing your own code as you go (with a good quality test making it clear whether or not your code is of suitable quality) you can make a case that TDD is likely to provide even better code than that produces without the methodology in place.

There are several great advantages in using TDD:
['Steven Curtis']
['Development', 'Software Development', 'Testing', 'Software Engineering', 'Programming']