Why Bug Injection Rates Matter
Why Bug Injection Rates Matter
A new source of waste in code to examine: the bug injection rate, and what testing teams can do about it.
Join the DZone community and get the full member experience.Join For Free
Writing wider charters, instead of detailed scripts, might initially help your testers find more problems. Once you’ve started down that road, though, we reach something called diminishing returns, where the company is trying to sweat out another percentage point or two of effort. That works for the folks in Operations Management at the airlines, trying to figure out how to add another route a day without adding a new plane to the fleet (or another row of seats in the plane), but most of us are better served to find something else to cut.
Today I’d like you to consider a new source of waste: The Bug Injection Rate.
Consider Two Teams
Both have identical test strategies, for a competing and nearly-identical product. The Programmers on Team A inject a new defect which needs fixing for about 75% of all changes while for team B the number is more like 3%.
Which test team is “better”?
Well, for a 100 change sprint, team A would have to go through eleven cycles of regression testing to get the number of defects to four. Team B finds three defects on the initial run. If our minimum escape number is four, team B doesn’t really need to do regression testing at all.
Those numbers and the story behind them are just a picture of what is possible … but it is possible. In the past few years I have seen teams without a regression test process at all, along with teams that desperately needed to spend a half-dozen cycles, testing and retesting, because they could not believe the software would work on the first build, or the second, or the third. Most of this software was complex, legacy applications, where the test team had strong reason to not believe. After all, it had never worked before.
It was my friend, Tom Wissink, Director of Integration, Test and Evaluation at Lockheed Martin, that first mentioned a term of this dysfunction: The Find-Fix-Retest Loop. That loop is expensive, but it is the repeated runs through the loops that really hurt. Not only are they expensive, but that expense means it makes economic sense to batch up work, releasing less often. That means that each release has more changes before testing, which means more defects, which leads to more test cycles, with more time spent documenting, reproducing, assigning and tracking defects. Personally, I think it would be more honest to call it the “test / explore to see how big the problem is / reproduce / document / argue about if it is a bug / argue if it should be fixed / help the developer reproduce it / fix / retest / document some more” cycle, which is as expensive as it sounds.
Too much bug injection combined with long releases leads to death marches and burnout. In one case, I saw a team essentially dissolve at the end of a project. The people that were left did not deliver any meaningful, working software for the next twelve months.
Many people would argue this is not a testing problem, and they might have a point. It is, however, a real problem, one that destroys the value of the test team.
What’s a Test Team to Do?
The first common response of teams is to tighten the cycle, using a technique like exploratory testing. Today I’ll suggest a second approach, to reduce the number of cycles, by improving first time quality and
For a tester to worry do, they have to take a step back from defects in the immediate build, to think about the overall development process. Because they tend to have more broad responsibilities yet remain hands-on, testers can actually be uniquely positioned to do this. For example, a tester can spend a lunch hour in the bug tracker, viewing the last hundred bugs. Asking if each problem could have been (or should have been) identified and fixed earlier. If the answer is yes, the tester can look for the root problem. Once the hour is over, the tester can look at which kinds of bugs are most common and easiest to prevent. Yes, some bugs will slip through, but you might find a surprisingly high percentage of bugs that come from a misunderstanding of what should be built, from unintended side-effects in systems, or from skipping simple component and unit tests.
Once you have an idea of how many bugs are avoidable, count the cost. Consider the potential savings for the organization if regression test cycles were cut in half or eliminated, moving to something more like Continuous Delivery. If the numbers are compelling, you now have an answer to that painful question “Why does testing cost so much?” along with an answer; the delivery team needs to improve first-time quality.
So look at the bug injection rate and first-time quality. Let us know what you find, and let’s keep talking.
We’ve got a lot of ground to cover.
Published at DZone with permission of Matthew Heusser . See the original article here.
Opinions expressed by DZone contributors are their own.