It’s probably been close to five years since I was in a room filled with twenty or so test leads and blurted out “it’s not the job of test to find bugs”. On that particular day, you could have heard a pin drop, but over time, that team – as well as other teams I’ve worked with are realizing this more and more. I’ve talked about the role of test before, so I’ll try not to rehash the same thing. I just get irked when I keep seeing web and print articles touting bug finding techniques as the essence of testing.
I have a bruise on my forehead from banging it against the wall after reading James Bach’s latest blog post. The summary is that he doesn’t want developers to run unit tests because then he won’t be able to find as many bugs (I guess this keeps him in business?). Defect prevention is where the real money is. Short of prevention, (almost) everyone knows that it is orders of magnitude less expensive to find defects as close to their introduction as possible. You may have heard the folk tale of the people drowning in a river (several variations exist):
Several villagers were walking by the river. One of the villagers noticed someone in the river yelling for help.
One of the villagers swam to save him. Then, they noticed another man in the river, and they pulled him out too. Soon, more people were seen drowning in the river, and the villager were pulling them out as fast as they could. They began to organize their rescue efforts and tried to find the most efficient method of saving everybody floating by. In the midst of this, two of the villagers started to run away along the shore of the river.
“Where are you going?” yelled one of the villagers. “We need you here to help us save these people!”
“We are going upstream to stop whoever is throwing them in!”
Anyone can hang out on the bank of the river and save hundreds of lives. You may even be good at coming up with better techniques for saving drowning people. A professional tester, however, always knows where to focus their efforts.
On a related note, the September issue of Better Software will print my short article titled “I’m tired of finding bugs”.