Today I witnessed an exchange between two very intelligent people the subject of writing automated tests for software development. There was more detail than I can put here, but the basic discussion was:
I think writing tests for my code is important. Management doesn’t think so.
Should I try to change their views?
The “For” argument was essentially:
Management is resistant to automated testing because they don’t understand the cost-to-value proposition. If you explain the benefit to them, they will come around.
The “Against” was, interestingly, similar:
Management is resistant to automated testing because they don’t understand the cost-to-value proposition. No amount of explanation will convince them. They must “come around” on their own.
I wanted to get involved in this, I really did, but I realized that arguing on the internet is, still, just arguing on the internet and it wasn’t a can of worms I was willing to open. So instead, I’ll place my banner in the ground right here. This is my third approach to this situation:
You are ultimately responsible for the company you work for.
If you disagree with their views without actively trying to change them, you actually agree with them.
The standard you walk past is the standard you accept.
If you claim to be a “testing zealot“, but work for a company that had forbade you from writing tests (or seriously limited your ability to write them) and you choose to stay, you really don’t care as much about testing as you claim. Conversely, of you think tests are a waste of time but you job requires them and you write them — guess what, you are a supporter of the testing culture.
Anyone can have opinions, but action speak louder than words. Ideas a cheap, execution is what counts.
So, although it sounds harsh, here is the ultimate truth as I see it:
If you want to write tests but your company won’t let you (and you’ve unsuccessfully tried to change their views), either leave and write tests somewhere else or stay with the knowledge that you don’t believe testing is as important as you thought.