CLOSE FULL VIEW
Test Driven JavaScript Development That Feels Great
Recorded at:
Community comments
Should clarify benefits of TDD vs. benefits of unit tests
by
David Karr
Posted
Should clarify benefits of TDD vs. benefits of unit tests
by
David Karr
This presentation makes a small mistake I've seen several times in other TDD presentations. It claims benefits of TDD that are actually the benefits of unit tests.
Specifically, the presenter lists the following:
* Reduced defect rates
* Protection against regression
* Better API design
* Re-use tests as your specs
These are all very good things, but except for "Better API design", these are all things that you get when you simply write good unit tests. One could argue that you could get better API design if you simply consider the concept of "design for testability" while writing your "code under test".
To be clear, test-driven development is a particular strategy for writing unit tests and the "code under test". I'm not trying to say that TDD is not a good thing. I believe it is, although there are still some people who believe in unit tests, but not in TDD. The main reason I want people to be clear on the distinction between writing unit tests and using TDD is that I've often worked with teams who don't even accept the value of unit tests (versus the costs), but who have top-level managers who are pushing for their teams to use TDD.
Specifically, the presenter lists the following:
* Reduced defect rates
* Protection against regression
* Better API design
* Re-use tests as your specs
These are all very good things, but except for "Better API design", these are all things that you get when you simply write good unit tests. One could argue that you could get better API design if you simply consider the concept of "design for testability" while writing your "code under test".
To be clear, test-driven development is a particular strategy for writing unit tests and the "code under test". I'm not trying to say that TDD is not a good thing. I believe it is, although there are still some people who believe in unit tests, but not in TDD. The main reason I want people to be clear on the distinction between writing unit tests and using TDD is that I've often worked with teams who don't even accept the value of unit tests (versus the costs), but who have top-level managers who are pushing for their teams to use TDD.
Hello stranger!
You need to Register an InfoQ account or Login or login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think