Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.

Responsive image


Test-driven development

Test-driven development (TDD) is a way of writing code that involves writing an automated unit-level 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, therefore shortening debugging time necessities.[1]

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

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

  1. ^ Parsa, Saeed; Zakeri-Nasrabadi, Morteza; Turhan, Burak (2025-01-01). "Testability-driven development: An improvement to the TDD efficiency". Computer Standards & Interfaces. 91: 103877. doi:10.1016/j.csi.2024.103877. ISSN 0920-5489.
  2. ^ Lee Copeland (December 2001). "Extreme Programming". Computerworld. Archived from the original on June 5, 2011. Retrieved January 11, 2011.
  3. ^ Newkirk, JW and Vorontsov, AA. Test-Driven Development in Microsoft .NET, Microsoft Press, 2004.
  4. ^ Feathers, M. Working Effectively with Legacy Code, Prentice Hall, 2004

Previous Page Next Page