Re:Kent Beck: “I get paid for code that works, not for tests...
by Klathmon on Thursday December 08, 2016 @10:11AM
(#13130735)
I've had a very similar experience.
It's worth it's weight in gold when you can flesh out edge cases and logic issues before going all-in on an architecture, and being able to refactor without fear is a great bonus, but it's not always applicable.
Unless the majority of the tests are "external" (i.e. testing an API by calling it's endpoints and testing the return), a major refactor is going to require updated tests, and it's all too common that I see people take the "easy" way out and fix the tests to conform to the way it's working after the refactor rather than the way it should work.
Re:Kent Beck: “I get paid for code that works, not for tests...
by hoorayimhelping on Thursday December 08, 2016 @01:14PM
(#13132568)
>Perhaps I'm just an outlier
If you are, then I am as well, because this is where a huge part of the value of tests come from - validating assumptions early and quickly and cheaply.
"Oh yeah, that's going to need to be thread safe."
"Oh yeah, that might be nil. Rather frequently."
In my experience, testing has been much more beneficial as an exercise of my mental model of the code and its interaction than for refactoring. But to that end, I can think of quite a few times that I've been very grateful for a unit test suite while I did a large refactoring.