What is Test-Driven Development (TDD)?

 Posted by SheoNarayan on 10/14/2008 | Category: Design Pattern & Practices Interview questions | Views: 16067

TDD is a software development methodology involving repeatedly writing test cases for classes and then building the corresponding classes to implement only the code necessary to successful pass the tests.

For more terminology visit: http://www.headspringsystems.com/terminology.jsp

Source: http://www.headspringsystems.com/terminology.jsp | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Vishvvas on: 9/3/2011 | Points: 10
TDD can better be described as a technique (having some tools also) which recommends for writing test case before one starts construction (developing) of the software. More theoretically, it is a cycle of testing, coding and refactoring under the development process. This is definitely a non-traditional way of software development where generally the testing occurs only after construction of software. The perceived benefits are (i) reduction in incidences of defects (ii) Improve the design through enforcement of critical analysis and design
(iii) up-to-date documentation (iv)debugging time greatly reduced
TDD is an integral part of XP (extreme programming) but the beauty of this techniques is it can be retrofit into any existing SDLC.
There are some precautions which would guard against failure of TDD
1. Considering for learning curve and estimating time for testing along with development
2. Legacy code is difficult to incorporate TDD

Login to post response