Test-driven development (TDD) is a software development process that employs short cycles of writing a test, making it fail, then writing code to pass the test. This helps improve code design and reduces defects. Each new feature starts with writing a test case, then coding just enough to pass the test, and refactoring the code without changing external behavior. TDD produces test code documentation and allows reversible changes by starting over from the last stable state if new code causes errors.
Related topics: