The long and arduous journey of software development has taken many turns and twists in the past decades, and one of the prominent software engineering techniques is nonetheless the TDD. There are more details and documents on TDD at http://agiledata.org/essays/tdd.html.
In a nutshell, the test-driven development, also popularly known as TDD, is a software development practice in which the development cycle begins with writing a test case that would fail, then writes the actual software to make the test pass, and continues to refactor and repeat the cycle till the software reaches the acceptable level. This process is depicted in the following diagram: