How to convince managers that developer-driven automated testing is valuable?

Posted by spierepf@reddit | ExperiencedDevs | View on Reddit | 65 comments

I've been a professional developer for about thirty years. My experience has taught me that I am my most productive when I use automated-test-based techniques (like TDD and BDD) to develop code, because it keeps the code-build-evaluate loop tight.

Invariably however, when I bring these techniques to work, my managers tend look at me like I am an odd duck. "Why do you want to run the test suite? We have a QA department for that." "Why are you writing integration tests? You should only write unit tests."

There is a perception that writing and running automated tests is a cost, and a drain on developer productivity.

At the same time, I have seen so many people online advocating for automated testing, that there must be shops someplace that consider automated testing valuable.

ExperiencedDevs, what are some arguments that you've used that have convinced managers of the value of automated testing?