3 ms·
Except that in my experience, unit tests just end up being a big ball of mud too. And at that point, they don't make refactoring easier, they actually make it h
by wtetzner 9y ago
Except that in my experience, unit tests just end up being a big ball of mud too. And at that point, they don't make refactoring easier, they actually make it harder.
Having good integration tests means that you're free to completely re-organize your code, and you can still test that it works as expected.
Given that requirements change over time, even a well thought out code structure will likely need to be refactored at some point, and being able to have a test suite that doesn't have to be re-written during a refactoring is extremely valuable.
I've also seen code bases become unnecessarily complex because so much thought was put into how to unit test it, that not enough thought was put into writing clear, easy to understand code.