3 ms·
Tests allow you to easily refactor implementation and allow you to add features without worrying as much about breaking the existing interface. However, they'r
by wvenable 9y ago
Tests allow you to easily refactor implementation and allow you to add features without worrying as much about breaking the existing interface.
However, they're terrible if you want to refactor your design and correct problems with the interface itself. Tests freeze the interface. This is really good for whole classes of problems but terrible for other classes of problems.
The debate is going to continue endlessly as those on either side are looking at it from entirely different frames of reference.
- jononor 9y agoThat is why I almost exclusively tests against external interfaces, since those should be frozen anyway (so others can depend on it). If the system is a web service that means the HTTP API, if it is a JS library it is the public API etc. And conversely almost no tests against internal interfaces, since internals don't matter and should be free to change.