agile

Test-driven development

Also called: TDD

PathTerms

Definition

Test-driven development, or TDD, is a software development process where developers write automated tests before writing the code itself. This approach ensures that code is written to meet specific requirements and that it functions as intended. The cycle involves writing a failing test, writing just enough code to make the test pass, and then refactoring the code to improve its design and maintainability. TDD promotes cleaner, more reliable code and reduces the likelihood of introducing bugs during development. For instance, a developer might write a test for a new user registration function, then write the code to pass that test, and finally clean up the code. It is distinct from behavior-driven development (BDD), which focuses on describing desired behavior from a user's perspective. This concept is frequently assessed on exams like the PMI-ACP, CAPM, and PMP.

Related terms

Related course suggestions

Related PathKey™ guides