3 ms·
The big error being made in this article (and most of the comments here) is the assumption that the purpose of unit tests is to "catch bugs." It isn't. The pur
by saltedmd5 9y ago
The big error being made in this article (and most of the comments here) is the assumption that the purpose of unit tests is to "catch bugs." It isn't.
The purpose of unit tests is to document the intended behaviour of a unit/component (which is not necessarily a single function/method in isolation) in such a way that if someone comes along and makes a change that alters specified behaviour, they are aware that they have done so and prevented from shipping that change unless they consciously alter that specification.
And, if you are doing TDD, as a code structure/design aid. But that is tangential to the article.
- dahauns 9y agoThe big error being made in this article (and most of the comments here) is the assumption that the purpose of unit tests is to "catch bugs." More like "in countless articles, comments, talks and projects over, say, the last decade".
- saltedmd5 9y agoYes - it's pretty frustrating to try and have an important discussion when 99% of the time it is framed incorrectly from the start.