Test-Driven Development

عمومی 1 views

Persian equivalent توسعه‌محور توسط آزمون

In plain language Test-Driven Development is a software development approach where tests are written before the actual code.

Short definition It is an agile practice where developers write failing unit tests first, then implement the minimum code to pass them, and finally refactor.

Detailed explanation and example

A developer writes a test expecting a function to return five, the test fails immediately, the code is then written to make the test pass, and finally the code is refactored for clarity.