DEV Community

Discussion on: TDD Practicality

Collapse
 
eljayadobe profile image
Eljay-Adobe

TDD is a forcing factor to drive a good chunk of SOLID principles.

TDD shores up OOP for languages that do not provide design by contract in the language. Languages that have contracts still can use unit tests, but the number of unit tests needed is greatly reduced.

TDD differs from other automated testing in that TDD-style unit tests are written by the developers, for development. Run in debug mode, as a design tool — not as a testing tool. Integration tests, acceptance tests, systems tests, performance tests, stress tests are written by software development quality engineers, which are run against the optimized release build. (Assuming a project big enough to have roles fulfilled by different people.)

TDD unit tests provide several values: 10,000 quatloos of primary value for guiding design. 100 quatloos of secondary value for enabling aggressive refactoring. And 1 quatloo of tertiary value as an artifact that can be used to detect regressions and continue to ensure basic correctness.

Collapse
 
cariehl profile image
Cooper Riehl

Just want to say, I love your usage of "primary value", "secondary value" and "tertiary value". Everything provides value in a variety of ways, and I applaud you for pointing that out.