Test-driven development

Test-driven development (TDD) is a way of writing code that involves writing an automated test case that fails, then writing just enough code to make the test pass, then refactoring both the test code and the production code, then repeating with another new test case.

Alternative approaches to writing automated tests is to write all of the production code before starting on the test code or to write all of the test code before starting on the production code. With TDD, both are written together.

TDD is related to the test-first programming concepts of extreme programming, begun in 1999,[1] but more recently has created more general interest in its own right.[2]

Programmers also apply the concept to improving and debugging legacy code developed with older techniques.[3]

  1. ^ Lee Copeland (December 2001). "Extreme Programming". Computerworld. Archived from the original on June 5, 2011. Retrieved January 11, 2011.
  2. ^ Newkirk, JW and Vorontsov, AA. Test-Driven Development in Microsoft .NET, Microsoft Press, 2004.
  3. ^ Feathers, M. Working Effectively with Legacy Code, Prentice Hall, 2004

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search