Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects simply to a non-technical, business audience. Over…
Test driven development (TDD) is an software development approach in which a test is written before writing the code. Once the new code passes the test, it is refactored to an acceptable standard.
TDD ensures that the source code is thoroughly unit tested and leads to modularized, flexible and extensible code. It focuses on writing only the code necessary to pass tests, making the design simple and clear.
TDD enables the programmer to take small steps while writing software. The test is written before testing the functionality and ensures that the application is suitable for testability. Testing on a small amount of code is performed to trap errors that occur in the tested code. Then the functionality is implemented. This is referred to as “red green refactor” where red means fail and green shows a pass. These steps are then repeated. The first goal of a programmer is to focus on the task at hand and to pass it.
The different steps involved in a test driven development cycle are:
Techopedia’s editorial policy is centered on delivering thoroughly researched, accurate, and unbiased content. We uphold strict sourcing standards, and each page undergoes diligent review by our team of top technology experts and seasoned editors. This process ensures the integrity, relevance, and value of our content for our readers.
Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.
What is GitHub? GitHub is a vast platform that changes how software developers work together on projects. It's more than...
Maria WebbTechnology journalist
What is CALMS? CALMS stands for Culture, Automation, Lean, Measurement, and Sharing. It is a framework widely recognized in the...
Marshall GunnellIT & Cybersecurity Expert
What is a Pull Request? A pull request, often abbreviated as PR, is a feature in version control systems like...
Trending NewsLatest GuidesReviewsTerm of the Day