2 ms·
This is true. The most important way in which TDD can turn into a cargo cult practice is to test every class and every method separately. This then turns into t
by cjfd 5y ago
This is true. The most important way in which TDD can turn into a cargo cult practice is to test every class and every method separately. This then turns into the testing of implementation details that are very much subject to change. It can also lead to the testing of trivialities, like 'can the standard library of my language still add elements to a container'. One should in most cases write tests about somewhat higher level properties of a system where the user might actually recognize the tests as being about stuff that they value. In most cases one would write tests about a small set of closely related classes. There should also be tests about somewhat larger clusters but there should be fewer of them because they tend to be more brittle and have worse performance.
- mbrodersen 5y agoAgree. Automatic system/user level testing is awesome. Automatic unit/module/class testing is a waste of time.