This is the big question : how much ?
Cheap people only calculate cost with money. But if you want well-tested software you’ve got to see the bigger picture.
Unit tests are like painting. A good artist knows what he wants and when he has it. He also knows the “why”. Same for (good) developers/managers.
As a manager you love metrics. Code coverage is a good metric. But a very limited one. Don’t be naive : a 100% code coverage is impossible and not enough to ensure quality. You must do more.
« If you don’t have unit tests, you are not refactoring, you are just moving shit around »
I’m so sorry. I could not find the source of this quote. But you get the meaning anyways. Or maybe not… Maybe you just think that unit tests are optional and refactoring is even more optional.
No. You can’t !
As a manager the only bossy instruction you should give is :
“Don’t you ever shut down a crashing test ! Fix it now !”
Unit tests are uselesss if they are not launched often, automatically and do some noise when crashing !
Let me illustrate the importance of unit testing with a budget / motivation nightmare we lived in one of my job.
But you can auto-test a lot more than you think.
Here is a quick tour of what can or cannot be tested easily.