TDD

From DevOps Dictionary

This page is a stub, and is awaiting more content from a community hero. You could be that hero.

TDD is an abbreviation for Test Driven Development, a software development approach that focuses on writing verification tests first, then implementing the feature. Traditional software development implements the feature first, then writes tests.

In TDD, the typical workflow is described as Red, Green, Refactor. First, write the tests; they will fail ("red result"). Next, implement the feature, and gradually the tests will start passing ("green result"). Finally, clean up the code by de-duplicating and applying other re-factoring practices; with each change run the tests again, and so long as the results stay "green", you know that you have made a valid re-factor without introducing errors.

Benefits of TDD

See Also