B T - W Q ?: Etter Esting Orse Uality
B T - W Q ?: Etter Esting Orse Uality
B T - W Q ?: Etter Esting Orse Uality
Presentation
Paper
Bio
Return to Main Menu
W3
Wednesday, February 14, 2001
10:15AM
International Conference On
Software Management & Applications of Software Measurement
February 12-16, 2001
San Diego, CA, USA
What Happened?
Defect Prevention
Elisabeth Hendrickson
esh@qualitytree.com
http://www.qualitytree.com
Page 1 of 11
Chuck continued, This diagram shows what you expected to have happen. You were
making a choice to increase the independent test effort. The symbol indicates that you
made a choice. You expected the decision to increase the independent test effort to result
in an increase in the number of defects found in system test. And it did. We found more
bugs in the last release than in the previous two releases combined.
Susan frowned at the unfamiliar symbols in the diagram. So the symbol on the line
between defects found in system test and defects released to the field means that we
could choose whether or not to fix the bugs?
Yup, Chuck replied. Fix the bugs, fewer known defects would ship to the field, and
bingoquality goes up. The symbol shows an inverse relationship between the
known defects in the field and the perceived quality. As the number of bugs shipped to
the field goes down, quality goes up, and vice versa. Similarly, as the number of defects
found in system test goes up, the number of unknown bugs released to the field goes
down.
So why didnt it work? Susan demanded.
Chuck turned back to the board, Ive been struggling with that question and I think I
finally have an answer. Before I got here, the developers were doing a lot of their own
testing. If we add them into this diagram, it looks like this:
Page 2 of 11
Chuck continued, The more the developers tested, the fewer bugs were delivered to
system test, and the fewer unknown bugs went to the field.
Susan tapped her foot in agitation. OK, so the more bugs there are, the more escape to
the field undetected. I get that.
So what happens to the developer test effort when the independent test effort increases?
Chuck asked.
Susan stared at the board for a moment. Theres no connection on the diagram.
Not yet. But do you think there should be? I realized last night that I think there is.
Chuck responded.
Oh.
Oh?
Susan sighed. I just remembered a conversation I overheard recently. A developer was
telling her lead that she wanted to spend a little more time making sure she got everything
right. The lead replied, Were late already! Just get it into test! Susan stood and
reached for a whiteboard pen. At the time, I thought that was the right answer. I wanted
the software in test as well, she said as she drew an inverse relationship between
Independent Test Effort and Developer Test Effort.
Page 3 of 11
Yup, I saw the same thing last night when I was muddling through the problem. Its an
unanticipated side effect. Chuck replied. The developers here thought that the
independent test group had assumed full responsibility for all the testingincluding the
testing they used to do.
Susan focused back on Chuck, Yes, I think youre right. And as a result, the number of
defects delivered to test continued to go up.
Attitudes made it worse: every time we found a show-stopper bug, we caught grief for
it, Chuck shook his head. But we continued catching them and schedules slipped.
Even so, we couldnt catch all the bugs. It took longer to make worse software.
Susan shrugged. So what do we do? If more testing will make the software worse, do
we stop testing?
Chuck exclaimed, Goodness no! We have to test. Otherwise we cant be sure we met
our quality goals before we ship. But we need to keep the developers from assuming that
the test team is here to catch everything.
Susan continued staring at the picture, And we can do that by
Two ways. One is that you can make a choice to put more emphasis on developer
testing. Two, we make it look like theres less testing resources available. Spread the
folks we have now a little more thinly. There are kinds of tests were not doing now that
we really need to do. By taking some of the testers already on staff to do that work, wed
effectively be reducing the test effortat least from the developers perspective.
Susan asked, What about the idea that having a developer test his own stuff is like the
fox watching the henhouse?
Page 4 of 11
Epilogue
Chuck reorganized his department, turning one large testing team into a collection of
smaller, more specialized testing teams. The developers noticed the shift immediately.
One development lead wanted to know, Hey, when are we going to get more testers on
our project. Youre bottlenecked in test!
Were not going to get more testers. Chuck replied. Its a funny thing about testing
the worse the software is when it gets to us, the longer it takes to get out. I suggest you
work on making it right the first time.
The development lead didnt like that answer and he let Chuck know it, both publicly and
privately. But Chuck didnt change his stance. Soon after, the development lead sent this
email to his staff:
Page 5 of 11
The result? A remarkable decrease in the number of bugs delivered to test; more
predictable schedules; and increased quality to the customer.
Look at the bug counts. If the independent testers are finding more and more
bugs, are they getting better and better at testing, are there more bugs to find, or
both? Increasing bug find rates are always worth investigating.
Listen to the testers. When there are more bugs in the software than the testers
can catch, testers complain. Its completely broken! When asked for more
information about a bug they may reply, I cant spend more time on that bug.
There are too many more to report! This tells you that there really is a
bottleneck in testthe bugs are appearing faster than the testers can catch them.
Watch integration times. It should not take longer and longer to get the whole
system working together each cycle. If it does, it may mean that the system needs
to be integrated more frequently to catch interoperability problems earlier. It may
also mean that the components that make up the system are becoming more
fragile or buggy over time.
Listen to the developers. Most developers want to feel proud of the software
they deliver. Developers under pressure to throw it over the wall may begin
Page 6 of 11
Pay attention to resource demands. Watch for areas that seem to be demanding
more and more resources. Whenever you discover a bottleneck, youve just
received excellent information about the trouble points in your process. Look to
the point in the process one step before the bottleneck. For example, if the test
group desperately needs more testers, it may be that the developers arent doing
enough of their own testing. If the developers cant seem to deliver on time,
perhaps its because they dont know what they are supposed to build: the
requirements are poorly defined.
Bug fixing
Defect prevention
Independent testing
Page 7 of 11
Defect Prevention
If you want to improve the quality of the software, stop the problem at the source. Begin
by looking at the requirements: most bugs are caused by a lack of agreement on the
requirements, not by simple developer mistakes. Also identify bug-proofing techniques
to improve the quality of the implementation.
In this example, we want to see if the value of myvalue is 0. However, were actually
setting the value to 0 in all cases.
In many languages, the double equal signs (==) means compare while a single equal
sign (=) means set value. If the developer mistakenly uses = where she meant to
use ==, the meaning of the code changes entirely. In this case, the Do Something
Else code would never execute. Behold, a bug.
Page 8 of 11
Are there custom test harnesses to allow parts of the system to be tested
independently?
Do you use memory leak tools, and if so, do you use pre-defined test scripts with
the tools to ensure you touch on all the areas of the software?
Page 9 of 11
If the answer to any of these questions is I dont know or I dont think we do,
investigate a little more, then consider making some changes. The sooner a bug is found,
the less it costs to fix.
Also remember to schedule time for developer testing and bug fixing. Developers often
provide schedule estimates that only include activities necessary to get to code complete.
The schedules dont call out activities such as building test harnesses or taking time to
run tools such as Purify, BoundsChecker, or lint. If you are in a position to do so, insist
that the development schedule include time for these kinds of activities.
Defect Prevention
The key to improving the quality of your software is to invest heavily in bug prevention
and very early defect detection. Its best if the bug never happens. But if it does, the
closer to the original developers desk the bug is found, the better.
If anything seems to be discouraging the developers from spending time on bug proofing
and testing activities, find out why and eliminate all reasons for not spending time on
these critical activities.
Finally, remember that testing is a way to measure quality; it is not a remedy by itself. At
the very least, if you want to improve the quality of the software before release, you must
commit to fix the bugs found in testing.
So is it possible to have better testing and better quality? Certainlyas long as you dont
plan to get better quality by only improving the independent test effort.
Bibliography
Weinberg, Gerald. Quality Software Management : Volume 1 : Systems Thinking.
Dorset House, 1991
Weinberg, Gerald. Quality Software Management : Volume 2: First-Order
Measurement. Dorset House, 1993.
Thielen, David. No Bugs! Delivering Error - Free Code in C and C++. Addison Wesley
Publishing Company, 1992.
Page 10 of 11
Acknowledgements
Many thanks to Esther Derby, Nynke Fokma, Kirk Hendrickson, Cem Kaner, Nathaniel
Lee, Pat McGee, Maureen OHara, Neal Reizer, and Johanna Rothman, for reviewing
early drafts of this work and for their insights on system effects in software development.
Page 11 of 11
Elisabeth Hendrickson
Elisabeth Hendrickson is currently an independent consultant specializing in
software quality and testing. With over a dozen years of experience in the
software field, Elisabeth has seen several examples of better testing leading to
worse quality. Prior to becoming an independent consultant, Elisabeth was the
Director of Quality Engineering and Project Management at Aveo Inc. You can
read more of Elisabeth's thoughts on software management, quality, and testing
at www.qualitytree.com or reach her at esh@qualitytree.com.