TDD helps you develop software. Tests become a design. After writing the test, you first think about your code from the point of view of the consumer, creating a more convenient and compact software design.
In addition, when using TDD, you usually write your code in such a way that you can supply test mocks and stubs. This leads to less complex software, which makes it easy to change and maintain over time.
So, I think that talking about TDD is related to testing, but when doing this, other great advantages follow, such as quality (coverage), flexibility (decoupling), better design (I think as a consumer of API).
source
share