Middle
What is Test-Driven Development (TDD)?
sobes.tech AI
Answer from AI
Test-Driven Development (TDD) is a software development methodology based on a repetitive cycle:
- Write an automated test that fails (because the functionality is not yet implemented).
- Write the minimal code to make the test pass.
- Refactor the code (improve its structure, readability) without changing its behavior, ensuring all tests still pass.
The goal of TDD is to improve code design, increase confidence in its functionality, and reduce the number of defects.