3 ms·
The big problem I've noticed when reading unit tests in various projects is that they frequently test the implementation rather than the outcome: https://softw
by ddebernardy 8y ago
The big problem I've noticed when reading unit tests in various projects is that they frequently test the implementation rather than the outcome:
https://softwareengineering.stackexchange.com/a/304910/24932 https://softwareengineering.stackexchange.com/a/304910/24932
- macintux 8y agoThat's one reason I really like functional programming: it's easier to test pure functions, vs code with side effects that requires you to look at the internal state afterwards.
- tobr 8y agoOn the other hand, pure functions are also much easier to reason about, thus much less likely to cause bugs from "a tiny change" in the first place. It's in the messy imperative stuff things tend to break in incomprehensible ways, and where you really need tests.
- matt2000 8y agoI still find there's a fair amount of value in just having most of the code be executed regularly (on every commit, for example), even if you're not perfectly testing the output.