Bug Advocacy
Bug Advocacy
How to
Win Friends,
influence programmers
and
SToMp BUGs. (Not necessarily in that order.)
Cem Kaner
Professor of Computer Sciences
Florida Institute of Technology
[email protected]
www.kaner.com (testing website)
www.badsoftware.com (legal website)
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 1
Notice
These slides are modified from my seminar on software testing. That
seminar is based on TESTING COMPUTER SOFTWARE (2nd Ed., a book co-
authored with Jack Falk and Hung Quoc Nguyen), available from Wiley. The
book presents additional material on bug analysis and the design of bug
tracking processes. If you like the notes, you might try the book.
These notes include some legal information, but you are not my legal client and these
notes do not provide specific legal advice. If you need legal advice, please consult your
own attorney. I wrote these notes with the mass-market software development industry
in mind. Mission-critical and life-critical software development efforts involve specific and
rigorous procedures that are not described in these notes.
These are modified from the original course notes -- I’ve added a few pages of
background to take into account some of the comments that I make in lecture.
Jack Falk and Hung Quoc Nguyen did much of the original work on this material. Hung
has done extensive additional work on bug tracking system design. For details, go see
www.logigear.com.
I thank James Bach, Elizabeth Hendrickson, Doug Hoffman, Bob Johnson, Brian
Lawrence, Brian Marick, and Hung Quoc Nguyen for comments and contributions to
earlier versions of these notes. However, any errors in these notes are mine.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 2
GNU Free Documentation License
Version 1.1, March 2000
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other written document "free" in the
sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or
without modifying it, either commercially or noncommercially. Secondarily, this License preserves for
the author and publisher a way to get credit for their work, while not being considered responsible for
modifications made by others.
This License is a kind of "copyleft", which means that derivative works of the document must
themselves be free in the same sense. It complements the GNU General Public License, which is a
copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software
needs free documentation: a free program should come with manuals providing the same freedoms
that the software does. But this License is not limited to software manuals; it can be used for any
textual work, regardless of subject matter or whether it is published as a printed book. We
recommend this License principally for works whose purpose is instruction or reference.
A "Modified Version" of the Document means any work containing the Document or a portion of it,
either copied verbatim, or with modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of the Document that deals
exclusively with the relationship of the publishers or authors of the Document to the Document's
overall subject (or to related matters) and contains nothing that could fall directly within that overall
subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section
may not explain any mathematics.) The relationship could be a matter of historical connection with
the subject or with related matters, or of legal, commercial, philosophical, ethical or political position
regarding them.
The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those
of Invariant Sections, in the notice that says that the Document is released under this License.
The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-
Cover Texts, in the notice that says that the Document is released under this License.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 3
GNU Free Documentation License
Version 1.1, March 2000
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo
input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-
conforming simple HTML designed for human modification. Opaque formats include PostScript,
PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or
XML for which the DTD and/or processing tools are not generally available, and the machine-
generated HTML produced by some word processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself, plus such following pages as are
needed to hold, legibly, the material this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means the text near the most
prominent appearance of the work's title, preceding the beginning of the body of the text.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially or noncommercially,
provided that this License, the copyright notices, and the license notice saying this License applies to
the Document are reproduced in all copies, and that you add no other conditions whatsoever to those
of this License. You may not use technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept compensation in exchange
for copies. If you distribute a large enough number of copies you must also follow the conditions in
section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display
copies.
3. COPYING IN QUANTITY
If you publish printed copies of the Document numbering more than 100, and the Document's license
notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover.
Both covers must also clearly and legibly identify you as the publisher of these copies. The front
cover must present the full title with all words of the title equally prominent and visible. You may add
other material on the covers in addition. Copying with changes limited to the covers, as long as they
preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in
other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones
listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 4
GNU Free Documentation License
Version 1.1, March 2000
It is requested, but not required, that you contact the authors of the Document well before
redistributing any large number of copies, to give them a chance to provide you with an updated
version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the conditions of sections 2
and 3 above, provided that you release the Modified Version under precisely this License, with the
Modified Version filling the role of the Document, thus licensing distribution and modification of the
Modified Version to whoever possesses a copy of it. In addition, you must do these things in the
Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and
from those of previous versions (which should, if there were any, be listed in the History section of
the Document). You may use the same title as a previous version if the original publisher of that
version gives permission.
B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of
the modifications in the Modified Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has less than five).
C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to the other copyright
notices.
F. Include, immediately after the copyright notices, a license notice giving the public permission to
use the Modified Version under the terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts
given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title,
year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no
section entitled "History" in the Document, create one stating the title, year, authors, and publisher of
the Document as given on its Title Page, then add an item describing the Modified Version as stated
in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access to a Transparent
copy of the Document, and likewise the network locations given in the Document for previous
versions it was based on. These may be placed in the "History" section. You may omit a network
location for a work that was published at least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and
preserve in the section all the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles.
Section numbers or the equivalent are not considered part of the section titles.
M. Delete any section entitled "Endorsements". Such a section may not be included in the
Modified Version.
N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant
Section.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 5
GNU Free Documentation License
Version 1.1, March 2000
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary
Sections and contain no material copied from the Document, you may at your option designate some
or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the
Modified Version's license notice. These titles must be distinct from any other section titles.
You may add a section entitled "Endorsements", provided it contains nothing but endorsements of
your Modified Version by various parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words
as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one
passage of Front-Cover Text and one of Back-Cover Text may be added by (or through
arrangements made by) any one entity. If the Document already includes a cover text for the same
cover, previously added by you or by arrangement made by the same entity you are acting on behalf
of, you may not add another; but you may replace the old one, on explicit permission from the
previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their
names for publicity for or to assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License, under the terms
defined in section 4 above for modified versions, provided that you include in the combination all of
the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant
Sections of your combined work in its license notice.
The combined work need only contain one copy of this License, and multiple identical Invariant
Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same
name but different contents, make the title of each such section unique by adding at the end of it, in
parentheses, the name of the original author or publisher of that section if known, or else a unique
number. Make the same adjustment to the section titles in the list of Invariant Sections in the license
notice of the combined work.
In the combination, you must combine any sections entitled "History" in the various original
documents, forming one section entitled "History"; likewise combine any sections entitled
"Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled
"Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released under this
License, and replace the individual copies of this License in the various documents with a single
copy that is included in the collection, provided that you follow the rules of this License for verbatim
copying of each of the documents in all other respects.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 6
GNU Free Documentation License
Version 1.1, March 2000
You may extract a single document from such a collection, and distribute it individually under this
License, provided you insert a copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the
Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be
placed on covers that surround only the Document within the aggregate. Otherwise they must appear
on covers around the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute translations of the Document
under the terms of section 4. Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include translations of some or all Invariant
Sections in addition to the original versions of these Invariant Sections. You may include a translation
of this License provided that you also include the original English version of this License. In case of a
disagreement between the translation and the original English version of this License, the original
English version will prevail.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly provided for
under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void,
and will automatically terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses terminated so long as such
parties remain in full compliance.
Each version of the License is given a distinguishing version number. If the Document specifies that
a particular numbered version of this License "or any later version“ applies to it, you have the option
of following the terms and conditions either of that specified version or of any later version that has
been published (not as a draft) by the Free Software Foundation. If the Document does not specify a
version number of this License, you may choose any version ever published (not as a draft) by the
Free Software Foundation.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 7
GNU Free Documentation License
Version 1.1, March 2000
How to use this License for your documents
To use this License in a document you have written, include a copy of the License in the document
and put the following copyright and license notices just after the title page:
If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are
invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover
Texts being LIST"; likewise for Back-Cover Texts.
If your document contains nontrivial examples of program code, we recommend releasing these
examples in parallel under your choice of free software license, such as the GNU General Public
License, to permit their use in free software.
“If you publish or distribute Opaque copies of the Document numbering more than 100, you
must either include a machine-readable Transparent copy along with each Opaque copy, or
state in or with each Opaque copy a publicly-accessible computer-network location containing a
complete Transparent copy of the Document, free of added material, which the general
network-using public has access to download anonymously at no charge using public-standard
network protocols. If you use the latter option, you must take reasonably prudent steps, when
you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will
remain thus accessible at the stated location until at least one year after the last time you
distribute an Opaque copy (directly or through your agents or retailers) of that edition to the
public.”
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 8
About Cem Kaner
I’m in the business of improving software customer satisfaction.
I approach customer satisfaction from several angles. I’ve been a programmer, tester,
writer, teacher, user interface designer, software salesperson, and a manager of user
documentation, software testing, and software development, an organization
development consultant and an attorney focusing on the law of software quality. These
have provided many insights into relationships between computes, software,
developers, and customers.
Current employment
• Professor of Software Engineering, Florida Institute of Technology
• Private practice in the Law Office of Cem Kaner
Books
• Testing Computer Software (1988; 2nd edition with Hung Nguyen and Jack
Falk,1993). This received the Award of Excellence in the Society for Technical
Communication’s Northern California Technical Publications Competition and
has the lifetime best sales of any book in the field.
• Bad Software: What To Do When Software Fails (with David Pels). Ralph Nader
called this book “a how-to book for consumer protection in the Information Age.”
Education
• J.D. (law degree, 1993). Elected to the American Law Institute, 1999.
• Ph.D. (experimental psychology, 1984) (trained in measurement theory and in
human factors, the field concerned with making hardware and software easier and
safer for humans to use).
• B.A. (primarily mathematics and philosophy, 1974).
• Certified in Quality Engineering (American Society for Quality, 1992). Examiner
(1994, 1995) for the California Quality Awards.
• I am also a founder and co-host of the Los Altos Workshops on Software Testing
and the Software Test Managers’Roundtable.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 9
Bug Advocacy?
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 10
Selling Bugs
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 11
Motivating the Bug Fixer
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 12
Overcoming Objections
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 13
Bug Advocacy
By Better Researching
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 14
Motivating The Bug Fix:
Looking At The Failure
Some vocabulary
• An error (or fault) is a design flaw or a
deviation from a desired or intended state.
• An error won’t yield a failure without the
conditions that trigger it. Example, if the
program yields 2+2=5 on the 10th time you
use it, you won’t see the error before or
after the 10th use.
• The failure is the program’s actual
incorrect or missing behavior under the
error-triggering conditions.
• Defect is frequently used to refer to the
failure or to the underlying error.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 15
Motivating The Bug Fix:
Looking At The Failure
VOCABULARY EXAMPLE
INPUT A
INPUT B
PRINT A/B
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 16
Motivating the Bug Fix
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 17
Motivating the Bug Fix:
Make it More Serious
LOOK FOR FOLLOW-UP ERRORS
When you find a coding error, you have the program
in a state that the programmer did not intend and
probably did not expect. There might also be data
with supposedly impossible values.
The program is now in a vulnerable state. Keep
testing it and you might find that the real impact of the
underlying fault is a much worse failure, such as a
system crash or corrupted data.
I do three types of follow-up testing:
• Vary my behavior (change the conditions by
changing what I do)
• Vary the options and settings of the program
(change the conditions by changing something
about the program under test).
• Vary the software and hardware environment.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 18
Motivating the Bug Fix:
Make it More Serious
Follow-Up: Vary Your Behavior
Keep using the program after you see the problem.
• Bring it to the failure case again (and again). If the program
fails when you do X, then do X many times. Is there a
cumulative impact?
• Try things that are related to the task that failed. For example,
if the program unexpectedly but slightly scrolls the display
when you add two numbers, try tests that affect adding or that
affect the numbers. Do X, see the scroll. Do Y then do X, see
the scroll. Do Z, then do X, see the scroll, etc. (If the scrolling
gets worse or better in one of these tests, follow that up, you’re
getting useful information for debugging.)
• Try things that are related to the failure. If the failure is
unexpected scrolling after adding, try scrolling first, then
adding. Try repainting the screen, then adding. Try resizing the
display of the numbers, then adding.
• Try entering the numbers more quickly or changing the speed
of your activity in some other way.
• And try the usual exploratory testing techniques. So, for
example, you might try some interference tests. Stop the
program or pause it or swap it just as the program is failing. Or
try it while the program is doing a background save. Does that
cause data loss corruption along with this failure?
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 19
Motivating the Bug Fix:
Make it More Serious
Follow-Up: Vary Options and Settings
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 20
Motivating the Bug Fix:
Make it More Serious
Follow-Up: Vary Options and Settings
A bug might show a more serious failure if you run the
program with less memory, a higher resolution printer, with
more (or fewer) device interrupts coming in etc.
• If there is anything involving timing, use a really slow
computer, a really slow link, a really slow modem or printer.
And use very fast ones.
• If there is a video problem, try higher resolutions on the video
card. Try displaying MUCH more complex images (and much
simpler ones).
Note that we are not:
• checking standard configurations
• asking how broad the range of circumstances is that produces
the bug.
What we’re asking is whether there is a particular
configuration that will show the bug more spectacularly.
Returning to the example (unexpected scrolling when you
add two numbers), try things like:
• Different video resolutions
• Different mouse settings if you have a wheel mouse that does
semi-automated scrolling
• An NTSC (television) signal output instead of a traditional
(XGA or SVGA, etc.) monitor output.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 21
Motivating the Bug Fix:
Make it More Serious
IS THIS BUG NEW TO THIS VERSION?
In many projects, an old bug (from a previous shipping
release of the program) might not be taken very
seriously if there weren’t lots of customer complaints.
• (If you know it’s an old bug, check its complaint
history.)
• The bug will be taken more seriously if it is new.
• You can argue that it should be treated as new if
you can find a new variation or a new symptom that
didn’t exist in the previous release. What you are
showing is that the new version’s code interacts
with this error in new ways. That’s a new problem.
• This type of follow-up testing is especially
important during a maintenance release that is just
getting rid of a few bugs. Bugs won’t be fixed
unless they were (a) scheduled to be fixed because
they are critical or (b) new side effects of the new
bugfixing code.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 22
Question: How many
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 23
Motivating the Bug Fix:
Show it is More General
TRY VARIANTS THAT SHOULDN’T MATTER
The point of this exercise is to show that you get
the same failure whether a given variable is set
one way or another.
In follow-up testing, we varied “irrelevant”
variables with an eye to seeing differences in the
failure symptoms. We picked variables that
looked promising for this.
In generalization testing, we’re still looking to see
whether the failure symptoms change, but we’re
picking variables that we don’t expect to cause a
change. The point is to take a variable that has
been set one way throughout the testing of this
bug, show that you get the same problem with a
different setting, and then you can ignore this
variable, not discuss it in the bug report, treat it
as irrelevant.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 24
Motivating the Bug Fix:
Show it is More General
UNCORNER YOUR CORNER CASES
We test at extreme values because these are the most
likely places to show a defect. But once we find the
defect, we don’t have to stick with extreme value tests.
• Try mainstream values. These are easy settings
that should pose no problem to the program. Do
you replicate the bug? If yes, write it up, referring
primarily to these mainstream settings. This will be
a very credible bug report.
• If the mainstream values don’t yield failure, but the
extremes do, then do some troubleshooting around
the extremes. Is the bug tied to a single setting (a
true corner case)? Or is there a small range of
cases? What? In your report, identify the narrow
range that yields failures. The range might be so
narrow that the bug gets deferred. That might be
the right decision. In some companies, the product
has several hundred open bugs a few weeks before
shipping. They have to decide which 300 to fix
(the rest will be deferred). Your reports help the
company choose the right 300 bugs to fix, and help
people size the risks associated with the remaining
ones.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 25
Bug Advocacy
Overcoming
OBJECTIONS
By Better Researching
The Failure Conditions
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 26
Overcoming Objections
Via Analysis of the Failure
Things that will make programmers
resist spending their time on the bug:
• The programmer
can’t replicate the
defect.
• Strange and complex set of steps required
to induce the failure.
• Not enough information to know what
steps are required, and it will take a lot of
work to figure them out.
• The programmer doesn’t understand the
report.
• Unrealistic (e.g. “corner case”)
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 27
Objection, Objection:
Non-Reproducible Errors
Always report non-reproducible errors. If you report
them well, programmers can often figure out the
underlying problem.
To help them, you must describe the failure as
precisely as possible. If you can identify a display or a
message well enough, the programmer can often
identify a specific point in the code that the failure had
to pass through.
• When you realize that you can’t reproduce the bug,
write down everything you can remember. Do it now,
before you forget even more. As you write, ask yourself
whether you’re sure that you did this step (or saw this
thing) exactly as you are describing it. If not, say so.
Draw these distinctions right away. The longer you wait,
the more you’ll forget.
• Maybe the failure was a delayed reaction to something
you did before starting this test or series of tests. Before
you forget, note the tasks you did before running this
test.
• Check the bug tracking system. Are there similar
failures? Maybe you can find a pattern.
• Find ways to affect timing of your program or of your
devices, Slow down, speed up.
• Talk to the programmer and/or read the code.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 28
Non-Reproducible Errors
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 29
Non-Reproducible Errors:
Examples of Conditions Often Missed
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 30
Non-Reproducible Errors:
Examples of Conditions Often Missed
• The bug depends on the value of a hidden input variable. (Bob Stahl teaches this well.) In
any test, there are the variables that we think are relevant and then there is everything else. If
the data that you think are relevant don’t help you reproduce the bug, ask what other
variables were set, and what their values were, in the course of running or preparing this test.
• Some conditions are hidden and others are invisible. You cannot manipulate them and so it
is harder to recognize that they’re present. You might have to talk with the programmer
about what state variables or flags get set in the course of using a particular feature.
• Some conditions are catalysts. They make failures more likely to be seen. Example: low
memory for a leak; slow machine for a race. But sometimes catalysts are more subtle, such
as use of one feature that has a subtle interaction with another.
• Some bugs are predicated on corrupted data. They don’t appear unless there are impossible
configuration settings in the config files or impossible values in the database. What could
you have done earlier today to corrupt this data?
• The bug might appear only at a specific time of day or day of the month or year. Look for
week-end, month-end, quarter-end and year-end bugs, for example.
• Programs have various degrees of data coupling. When two modules use the same variable,
oddness can happen in the second module after the variable is changed by the first. (Books
on structured design, such as Yourdon/Constantine often analyze different types of coupling
in programs and discuss strengths and vulnerabilities that these can create.) In some
programs, interrupts share data with main routines in ways that cause bugs that will only
show up after a specific interrupt.
• Special cases appear in the code because of time or space optimizations or because the
underlying algorithm for a function depends on the specific values fed to the function (talk to
your programmer).
• The bug depends on you doing related tasks in a specific order.
• The bug is caused by a race condition or other time-dependent event, such as:
» An interrupt was received at an unexpected time.
» The program received a message from another device or system at an
inappropriate time (e.g. after a time-out.)
» Data was received or changed at an unexpected time.
• The bug is caused by an error in error-handling. You have to generate a previous error
message or bug to set up the program for this one.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 31
Non-Reproducible Errors:
Why is this Bug Hard to Reproduce?
• Time-outs trigger a special class of multiprocessing error handling failures. These used to
be mainly of interest to real-time applications, but they come up in client/server work and
are very pesky.
Process A sends a message to Process B and expects a response. B fails to respond. What
should A do? What if B responds later?
• Another inter-process error handling failure -- Process A sends a message to B and
expects a response. B sends a response to a different message, or a new message of its
own. What does A do?
• You’re being careful in your attempt to reproduce the bug, and you’re typing too slowly
to recreate it.
• The program might be showing an initial state bug, such as:
» The bug appears only the first time after you install the program (so it
happens once on every machine.)
» The bug appears once after you load the program but won’t appear again
until you exit and reload the program.
(See Testing Computer Software’s Appendix’s discussion of initial
state bugs.)
• The program may depend on one version of a DLL. A different program loads a different
version of the same DLL into memory. Depending on which program is run first, the bug
appears or doesn’t.
• The problem depends on a file that you think you’ve thrown away, but it’s actually still in
the Trash (where the system can still find it).
• A program was incompletely deleted, or one of the current program’s files was
accidentally deleted when that other program was deleted. (Now that you’ve reloaded the
program, the problem is gone.)
• The program was installed by being copied from a network drive, and the drive settings
were inappropriate or some files were missing. (This is an invalid installation, but it
happens on many customer sites.)
• The bug depends on co-resident software, such as a virus checker or some other process,
running in the background. Some programs run in the background to intercept foreground
programs’ failures. These may sometimes trigger failures (make errors appear more
quickly).
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 32
Non-Reproducible Errors:
Why is this Bug Hard to Reproduce?
• You forgot some of the details of the test you ran, including the critical one(s) or you
ran an automated test that lets you see that a crash occurred but doesn’t tell you what
happened.
• The bug depends on a crash or exit of an associated process.
• The program might appear only under a peak load, and be hard to reproduce because
you can’t bring the heavily loaded machine under debug control (perhaps it’s a
customer’s system).
• On a multi-tasking or multi-user system, look for spikes in background activity.
• The bug occurred because a device that it was attempting to write to or read from was
busy or unavailable.
• It might be caused by keyboard keybounce or by other hardware noise.
• Code written for a cooperative multitasking system can be thoroughly confused,
sometimes, when running on a preemptive multitasking system. (In the cooperative
case, the foreground task surrenders control when it is ready. In the preemptive case, the
operating system allocates time slices to processes. Control switches automatically
when the foreground task has used up its time. The application is suspended until its
next time slice. This switch occurs at an arbitrary point in the application’s code, and
that can cause failures.
• The bug occurs only the first time you run the program or the first time you do a task
after booting the program. To recreate the bug, you might have to reinstall the program.
If the program doesn’t uninstall cleanly, you might have to install on a fresh machine
(or restore a copy of your system taken before you installed this software) before you
can see the problem.
• The bug is specific to your machine’s hardware and system software configuration.
(This common problem is hard to track down later, after you’ve changed something on
your machine. That’s why good reporting practice involves replicating the bug on a
second configuration.)
• The bug was a side-effect of a hardware failure. This is rarely the problem, but
sometimes it is. A flaky power supply creates irreproducible failures, for example.
Another example: One prototype system had a high rate of irreproducible firmware
failures. Eventually, these were traced to a problem in the building’s air conditioning.
The test lab wasn’t being cooled, no fan was blowing on the unit under test, and several
of the prototype boards in the machine ran very hot. (Later versions would run cooler,
but these were early prototypes.) The machine was failing at high temperatures.
• Someone tinkered with your machine when you weren’t looking.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 33
Putting Bugs in the Dumpster
Problem:
Non-reproducible bugs burn a huge amount of programmer
troubleshooting time, then get closed. Until they are closed, they
show up in open-bug statistics. In companies that manage more
by bug numbers than by good sense, there is tremendous pressure
to close irreproducible bugs quickly.
The Dumpster:
• A resolution code that puts the bug into an ignored storage place.
The bug shows up as resolved (or is just never counted) in the bug
statistics, but it is not closed. It is in a holding pattern.
• Assign a non-reproducible bug to the dumpster whenever you
(testers and programmers) spend enough time on it that you don’t
think that more work on the bug will be fruitful at this time.
Dumpster Diving
• Every week or two, (testers and/or programmers) go through the
dumpster bugs looking for similar failures. At some point, you’ll
find a collection of several similar reports. If you (or the
programmer) think there are enough variations in the reports to
provide useful hints on how to repro the bug, spend time on the
collection. If you (or the programmer) can repro the bugs, reopen
them with the extra info (status is now open, resolution is
pending)
• Near the end of the project, do a final review of bugs in the
dumpster. These will either close non-repro or be put through one
last scrutiny
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 34
Overcoming Objections
Via Analysis of the Failure
Things that will make programmers
resist spending their time on the bug:
• The programmer can’t replicate the defect.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 35
Simplify, Simplify:
Split the Report in Two
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 37
Simplify, Simplify:
Put Variations After the Main Report
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 38
Corner Conditions
A Thought Experiment
(I’ve never tried anything like this on Quicken.
This example is purely hypothetical.)
• Imagine that you were testing Quicken. I understand
that it can handle an arbitrarily large number of
checks, limited only by the size of the hard disk. So,
being a tester, you go buy the biggest whopping hard
disk on the market (about 70 gig at the moment, I
think) and then write a little program to generate a
Quicken-like data file with a billion or so checks.
• Now, open Quicken, load that file, and add 1 more
check. Let’s pretend that it works — sort of. The
clock spins and spins while Q sorts the new check
into place. At the end of four days, you regain
control.
• So you write a bug report— “4 days to add a check is
a bit too long.”
• The programmers respond— “Not a bug. Only
commercial banks manage a billion checks. If you’re
Citibank, use a different program.”
Suppose that you decided to follow this up because
you thought the programmers are dismissing a real
problem without analysis. What would you do?
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 39
Overcoming Objections:
Unrealistic (e.g., Corner Conditions)
Some reports are inevitably dismissed as
unrealistic (having no importance in real use).
• If you’re dealing with an extreme value, do follow-up
testing with less extreme values.
• If you’re protesting a bug that has been left unfixed for
several versions, realized that it has earned tenure in
some people’s minds. Perhaps, though, customer
complaints about this bug have simply never filtered
through to developers.
• If your report of some other type of defect or design
issue is dismissed as having “no customer impact,” ask
yourself:
Hey, how do they know
the customer impact?
• Then check with
» Technical marketing
» Technical support
» Human factors
» Documentation and training
» Network administrators
» In-house power users
» Maybe sales or corporate communications.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 40
Thought Experiment--Notes
The classroom discussion on the thought experiment walks through a lot of
alternatives. Here is the result that I try to steer people toward:
(a) There is no wisdom in following up a deferred bug unless you can add value
to your report. The operative rule of thumb here is, “If you’re going to
fight, win!” (If you can’t win, don’t fight. Pick your battles.)
(b) There isn’t much sense in doing a full engineering study at this point (some
people want to do a parametric map showing how much time it takes to add
a cheque, across many different numbers of cheques. The reason this is not
sensible is that the bug has already been deferred. It will probably stay
deferred. The more time you spend on it, the more time you put at risk. So,
the question is, how do we spend the minimum time needed to
mount a good challenge?
(c) We are looking for a single, magic number of cheques, if possible. That
magic number is the largest credible number of cheques, i.e. a number small
enough that the programmers won’t dismiss it but large enough that the
program still has a good chance of showing a problem.
(d) Many testers draw on their own experience for deciding what the right
number of cheques would be. There are worse things to do, but this is
certainly subject to the challenge that the tester is using a dumb number.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 41
Bug Advocacy
Advocating for
bug fixes
by alerting people
to costs.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 42
Money Talks: Cost of Finding
and Fixing Software Errors
This curve maps the increase of cost the later that you find and fix an
error.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 43
Cost of Finding and Fixing
Software Errors
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 45
Quality-Related Costs
Prevention Appraisal
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 46
Examples of Quality Costs
Prevention Appraisal
• Staff training • Design review
• Requirements analysis • Code inspection
• Early prototyping • Glass box testing
• Fault-tolerant design • Black box testing
• Defensive programming • Training testers
• Usability analysis • Beta testing
• Clear specification • Test automation
• Accurate internal • Usability testing
documentation • Pre-release out-of-box testing
• Pre-purchase evaluation of the by customer service staff
reliability of development tools
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 47
Customers’Quality Costs
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 49
Cem Kaner, Ph.D., J.D. P. O . Box 1200
Attorney at Law Santa Clara, CA 9 5 0 5 2
[email protected] 4 0 8 -2 4 4 -7 0 0 0
Joseph Juran, one of the world’s leading quality theorists, has been advocating the analysis of
quality-related costs since 1951, when he published the first edition of his Quality Control
Handbook. Feigenbaum made it one of the core ideas underlying the Total Quality Management
movement.2 It is a tremendously powerful tool for product quality, including software quality.
Here are six useful definitions, as applied to software products. Figure 1 gives examples
of the types of cost. Most of Figure 1’s examples are (hopefully) self-explanatory, but I’ll provide
some additional notes on a few of the costs: 4
• Prevention Costs: Costs of activities that are specifically designed to prevent poor
quality. Examples of “poor quality” include coding errors, design errors, mistakes in
the user manuals, as well as badly documented or unmaintainably complex code.
Note that most of the prevention costs don’t fit within the Testing Group’s budget. This
money is spent by the programming, design, and marketing staffs.
§ Appraisal Costs: Costs of activities designed to find quality problems, such as code
inspections and any type of testing.
1 Gryna, F. M. (1988) “Quality Costs” in Juran, J.M. & Gryna, F. M. (1988, 4 th Ed.), Juran’s Quality Control Handbook,
McGraw-Hill, page 4.2.
2 Feigenbaum, A.V. (1991, 3 rd Ed. Revised), Total Quality Control, McGraw-Hill, Chapter 7.
3 Gryna, F. M. “Quality Costs” in Juran, J.M. & Gryna, F. M. (1988, 4 th Ed.), Juran’s Quality Control Handbook,
McGraw-Hill, page 4.2. I’m not aware of reliable data on quality costs in software.
4 These are my translations of the ideas for a software development audience. More general, and more complete,
definitions are available in Campanella, J. (Ed.) (1990), Principles of Quality Costs, ASQC Quality Press, as well as in
Juran’s and Feigenbaum’s works.
• Failure Costs: Costs that result from poor quality, such as the cost of fixing bugs and
the cost of dealing with customer complaints.
• Internal Failure Costs: Failure costs that arise before your company supplies its
product to the customer. Along with costs of finding and fixing bugs are many
internal failure costs borne by groups outside of Product Development. If a bug
blocks someone in your company from doing her job, the costs of the wasted time,
the missed milestones, and the overtime to get back onto schedule are all internal
failure costs.
For example, if your company sells thousands of copies of the same program, you will
probably print several thousand copies of a multi-color box that contains and
describes the program. You (your company) will often be able to get a much better
deal by booking press time in advance. However, if you don’t get the artwork to the
printer on time, you might have to pay for some or all of that wasted press time
anyway, and then you may have to pay additional printing fees and rush charges to
get the printing done on the new schedule. This can be an added expense of many
thousands of dollars.
Some programming groups treat user interface errors as low priority, leaving them
until the end to fix. This can be a mistake. Marketing staff need pictures of the
product’s screen long before the program is finished, in order to get the artwork for
the box into the printer on time. User interface bugs – the ones that will be fixed later
– can make it hard for these staff members to take (or mock up) accurate screen
shots. Delays caused by these minor design flaws, or by bugs that block a packaging
staff member from creating or printing special reports, can cause the company to
miss its printer deadline.
Including costs like lost opportunity and cost of delays in numerical estimates of the
total cost of quality can be controversial. Campanella (1990)1 doesn’t include these in
a detailed listing of examples. Gryna (1988)2 recommends against including costs like
these in the published totals because fallout from the controversy over them can kill
the entire quality cost accounting effort. I include them here because I sometimes
find them very useful, even if it might not make sense to include them in a balance
sheet.
• External Failure Costs: Failure costs that arise after your company supplies the
product to the customer, such as customer service costs, or the cost of patching a
released product and distributing the patch.
External failure costs are huge. It is much cheaper to fix problems before shipping the
defective product to customers.
1 Principles of Quality Costs, ASQC Quality Press, Appendix B, “Detailed Description of Quality Cost Elements.”
2 “Quality Costs”in Juran, J.M. & Gryna, F. M. (1988, 4th Ed.), Juran’s Quality Control Handbook, McGraw-Hill, pages
4.9 - 4.12.
I’ve omitted from Figure 1 several additional costs that I don’t know how to
estimate, and that I suspect are too often too controversial to use. Of these,
my two strongest themes are cost of high turnover (people quit over quality-
related frustration – this definitely includes sales staff, not just development
and support) and cost of lost pride (many people will work less hard, with less
care, if they believe that the final product will be low quality no matter what
they do.)
Prevention Appraisal
• Staff training • Design review
• Requirements analysis • Code inspection
• Early prototyping • Glass box testing
• Fault-tolerant design • Black box testing
• Defensive programming • Training testers
• Usability analysis • Beta testing
• Clear specification • Test automation
• Accurate internal documentation • Usability testing
• Evaluation of the reliability of development • Pre-release out-of-box testing by customer
tools (before buying them) or of other potential service staff
components of the product
1 The product is scheduled for release on July 1, so your company arranges (far in advance) for an advertising campaign starting July 10. The product has
too many bugs to ship, and is delayed until December. All that advertising money was wasted.
2If the product had to be shipped late because of bugs that had to be fixed, the direct cost of late shipment includes the lost sales, whereas the
opportunity cost of the late shipment includes the costs of delaying other projects while everyone finished this one.
3Note, by the way, that you can reduce external failure costs without improving product quality. To reduce post-sale support costs without increasing
customer satisfaction, charge people for support. Switch from a toll-free support line to a toll line, cut your support staff size and you can leave callers on
hold for a long time at their expense. This discourages them from calling back. Because these cost reductions don’t increase customer satisfaction, the
seller’s cost of quality is going down, but the customer’s is not.
4 This is the cost of cooperating with a government investigation. Even if your company isn’t charged or penalized, you spend money on lawyers, etc.
5 Some penalties are written into the contract between the software developer and the purchaser, and the developer pays them if the product is late or has
specified problems. Other penalties are imposed by law. For example, the developer/publisher of a computer program that prepares United States taxes is
liable for penalties to the Internal Revenue Service for errors in tax returns that are caused by bugs or design errors in the program. The publishers are
treated like other tax preparers (accountants, tax lawyers, etc.). See Revenue Ruling 85-189 in Cumulative Bulletin, 1985-2, page 341.
I generally work with young, consumer-oriented software companies who don’t see
TQM programs as their top priority, and therefore my approach is more tactical. There is
significant benefit in using the language and insights of quality cost analysis, on a
project/product by project/product basis, even in a company that has no interest in Total
Quality Management or other formal quality management models.1
Here’s an example. Suppose that some feature has been designed in a way that you
believe will be awkward and annoying for the customer. You raise the issue and the project
manager rejects your report as subjective. It’s “not a bug.” Where do you go if you don’t want
to drop this issue? One approach is to keep taking it to higher-level managers within product
development (or within the company as a whole). But without additional arguments, you’ll
often keep losing, without making any friends in the process.
Suppose that you change your emphasis instead. Rather than saying that, in your
opinion, customers won’t be happy, collect some other data:2
• Ask the writers: Is this design odd enough that it is causing extra effort to
document? Would a simpler design reduce writing time and the number of pages
in the manual?
• Ask the training staff: Are they going to have to spend extra time in class, and to
write more supplementary materials because of this design?
§ Ask Technical Support and Customer Service: Will this design increase support
costs? Will it take longer to train support staff? Will there be more calls for
explanations or help? More complaints? Have customers asked for refunds in
previous versions of the product because of features designed like this one?
1 I am most definitely not saying that a tactical approach is more practical than an integrated, long-term approach.
Gryna notes that there are two common approaches to cost-of-quality programs. One approach involves one-shot
studies that help the company identify targets for significant improvement. The other approach incorporates
quality cost control into the structure of the business. (Gryna, 1988, in Juran, J. M. & Gryna, F. M. (1988, 4th Ed.),
Juran’s Quality Control Handbook, McGraw-Hill, pages 4.2 onward.) The one-shot, tactical approach can prove
the benefit of the more strategic, long-term system to a skeptical company.
2 Be sensitive to how you do this. If you adopt a tone that says that you think the project manager and the
programming staff are idiots, you won’t enjoy the long-term results.
• Ask the sales staff: If you think that this feature is very visible, and visibly
wrong, ask whether it will interfere with sales demonstrations, or add to
customer resistance.
You won’t get cost estimates from everyone, but you might be able to get ballpark
estimates from most, along with one or two carefully considered estimates. This is enough to
give you a range to present at the next project meeting, or in a follow-up to your original bug
report. Notice the difference in your posture:
• You’re no longer presenting your opinion that the feature is a problem. You’re
presenting information collected from several parts of the company that
demonstrates that this feature’s design is a problem.
• You’re no longer arguing that the feature should be changed just to improve the
quality. No one else in the room can posture and say that you’re being “idealistic”
whereas a more pragmatic, real-world businessperson wouldn’t worry about
problems like this one. Instead, you’re the one making the hard-nosed business
argument, “This design is going to cost us $X in failure costs. How much will it
cost to fix it?”
• Your estimates are based on information from other stakeholders in this project.
If you’ve fairly represented their views, you’ll get support from them, at least to
the extent of them saying that you are honestly representing the data you’ve
collected.
Along with arguing about individual bugs, or groups of bugs, this approach opens up
opportunities for you (and other non-testers who come to realize the power of your
approach) to make business cases on several other types of issues. For example:
• The question of who should do unit testing (the programmers, the testers, or no
one) can be phrased and studied as a cost-of-quality issue. The programmers
might be more efficient than testers who don’t know the code, but the testers
might be less expensive per hour than the programmers, and easier to recruit and
train, and safer (unlike newly added programmers, new testers can’t write new
bugs into the code) to add late in the project.
§ The depth of the user manual’s index is a cost-of-quality issue. An excellent index
might cost 35 indexer-minutes per page of the manual (so a 200 page book would
take over three person-weeks to index). Trade this cost against the reduction in
support calls because people can find answers to their questions in the manual.
Implementation Risks
Gryna (1988)1 and Juran & Gryna (1980)2 point out several problems that have caused
cost-of-quality approaches to fail. I’ll mention two of the main ones here.
First, it’s unwise to try to achieve too much, too fast. For example, don’t try to apply
a quality cost system to every project until you’ve applied it successfully to one project. And
don’t try to measure all of the costs, because you probably can’t.3
Second, beware of insisting on controversial costs. Gryna (1988)4 points out several
types of costs that other managers might challenge as not being quality-related. If you
include these costs in your totals (such as total cost of quality), some readers will believe
that you a padding these totals, to achieve a more dramatic effect. Gryna’s advice is to not
include them. This is usually wise advice, but it can lead you to underestimate your
customer’s probable dissatisfaction with your product. As we see in the next section, down
that road lies LawyerLand.
1 in Juran, J. M. & Gryna, F. M. (1988, 4th Ed.), Juran’s Quality Control Handbook, McGraw-Hill, pages 4.27-
4.28.
2 Quality Planning and Analysis (2nd Ed.), McGraw-Hill, pages 30-32. Also, see Brown, M. G., Hitchcock, D. E. &
Willard, M. L. (1994), Why TQM Fails and What To Do About It, Irwin Professional Publishing.
3 As he says in Juran, J.M. (1992), Juran on Quality by Design, The Free Press, p. 119, Costs of poor quality
“are huge, but the amounts are not known with precision. In most companies the accounting system provides
only a minority of the information needed to quantify this cost of poor quality. It takes a great deal of time and
effort to extend the accounting system so as to provide full coverage. Most companies have concluded that such
an effort is not cost effective. [¶] What can be done is to fill the gap by estimates, which provide managers with
approximate information as to the total cost of poor quality and as to where the major areas of concentration
are.”
4 “Quality Costs”in Juran, J.M. & Gryna, F. M. (1988, 4th Ed.), Juran’s Quality Control Handbook, McGraw-Hill,
pages 4.9 - 4.12.
In other words, it looked cheaper to pay an average of $200,000 per death in lawsuit costs
than to pay $11 per car to prevent fuel tank explosions. Ultimately, the lawsuit losses
were much higher.2
This kind of analysis didn’t go away with the Pinto. For example, in the more
recent case of General Motors Corp. v. Johnston (1992),3 a PROM controlled the fuel
injector in a pickup truck. The truck stalled because of a defect in the PROM and in the
ensuing accident, Johnston’s seven-year old grandchild was killed. The Alabama Supreme
Court justified an award of $7.5 million in punitive damages against GM by noting that
GM “saved approximately $42,000,000 by not having a recall or otherwise notifying its
purchasers of the problem related to the PROM.”
Most software failures don’t lead to deaths. Most software projects involve
conscious tradeoffs among several factors, including cost, time to completion, richness of
the feature set, and reliability. There is nothing wrong with doing this type of business
tradeoff, consciously and explicitly, unless you fail to take into account the fact that some
of the problems that you leave in the product might cost your customers much, much
more than they cost your company. Figure 2 lists some of the external failure costs that
are borne by customers, rather than by the company.
1 This table is published in Keeton, W. P., Owen, D.G., Montgomery, J. E., & Green, M.D. (1989, 2nd Ed.)
Products Liability and Safety, Cases and Materials, Foundation Press, page 841 and Posner, R.A. (1982)
Tort Law: Cases and Economic Analysis, Little Brown & Co., page 225.
2 Grimshaw v. Ford Motor Co. (1981), (California Court of Appeal), California Reporter, volume 174, page
348.
3 Southern Reporter, 2nd Series, volume 592, pages 1054 and 1061.
These are the types of costs absorbed by the These are the types of costs absorbed by the
seller that releases a defective product. customer who buys a defective product.
The point of quality-related litigation is to transfer some of the costs borne by a cheated
or injured customer back to the maker or seller of the defective product. The well-publicized
cases are for disastrous personal injuries, but there are plenty of cases against computer
companies and software companies for breach of contract, breach of warranty, fraud, etc.
The problem of cost-of-quality analysis is that it sets us up to underestimate our litigation and
customer dissatisfaction risks. We think, when we have estimated the total cost of quality
associated with a project, that we have done a fairly complete analysis. But if we don’t take
customers’external failure costs into account at some point, we can be surprised by huge
increased costs (lawsuits) over decisions that we thought, in our incomplete analyses, were safe
and reasonable.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 59
Software Errors:
What is Quality?
Here are some of the traditional
definitions:
• Fitness for use (Dr. Joseph M. Juran)
• The totality of features and characteristics
of a product that bear on its ability to
satisfy a given need (ASQ)
• Conformance with requirements (Philip
Cosby)
• The total composite product and service
characteristics of marketing, engineering,
manufacturing and maintenance through
which the product and service in use will
meet expectations of the customer
(Armand V. Feigenbaum)
Note the absence of “conforms to
specifications.”
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 60
Software Errors:
What is Quality?
Juran distinguishes between Customer
Satisfiers and Dissatisfiers as key
dimensions of quality:
Customer Satisfiers
• the right features
• adequate instruction
Dissatisfiers
• unreliable
• hard to use
• too slow
• incompatible with the customer’s equipment
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 61
Software Errors:
What Should We Report?
I like Gerald Weinberg’s definition:
Quality is value to some person
Glen Myers’definition:
• A software error is present when the program does not do what its user
reasonably expects it to do.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 62
Quality is Multidimensional
Content Customer
Development Manufacturing Service
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 63
Quality is Multidimensional:
Different People, Different Visions
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 64
Software Errors:
Why are there Errors?
New testers often conclude that the programmers on their project are
incompetent or unprofessional.
• This is counterproductive. It leads to infighting instead of communication, and it
leads to squabbling over bugs instead of research and bug fixing.
• And as we saw when we discussed private bug rates, programmers actually find and
fix the large majority of their own bugs.
• Bugs come into the code for many reasons. It’s worth considering some common
systematic (as distinct from poor individual performance) factors. You will learn to
vary your strategic approaches as you learn your companies’weaknesses.
Bugs come into the code for many reasons:
• The major cause of error is that programmers deal with tasks that aren’t fully
understood or fully defined. This is said in many different ways. For example:
» Tom Gilb and Dick Bender quote industry-summary statistics that 80%
of the errors, or 80% of the effort required to fix the errors, are caused
by bad requirements;
» Roger Sherman recently summarized research at Microsoft that the
most common underlying issue in bug reports involved a need for new
code.
If you graduated from a Computer Science program, how much training did you
have in task analysis? Requirements definition? Usability analysis? Negotiation and
clear communication of negotiated agreements? Not much? Hmmmm . . . .
• Some companies drive their programmers too hard. They don’t have enough time to
design, bulletproof, or test their code. Another Sherman quote: “Bad schedules are
responsible for most quality problems.”
• Late design changes result in last minute code changes, which are likely to have
errors.
• Some third-party components introduce bugs. Your program might rely on a large
suite of small components that display a specific type of object, filter data in a
special way, drive a specific printer, etc. Many of these tools, bought from tool
vendors or hardware vendors, are surprisingly buggy. Others work, but they aren’t
fully compatible with common test automation tools.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 65
Software Errors:
Why are there Errors?
• Some programs or tasks are inherently complex. Boris Beizer talks perceptively
about the locality problem in software. Think about an underlying bug, and then
about the symptoms caused by the bug. When symptoms appear, there is no
assurance that they will be close in time, space, or severity to the underlying bug.
They may appear much later, or when working with a different part of the program,
and they may seem much more or much less serious than the bug.
• Failure to use source control tools creates characteristic bugs. For example, if a bug
goes away, comes back, goes away, comes back, goes away, comes back, then ask
how the programming staff makes sure it’s linking the most recent version of each
module when it builds a version for you to test.
• Some programmers (some platforms) work with poor tools. Weak compilers, style
checkers, debuggers, profilers, etc. make it too easy to get bugs or too hard to find
bugs.
• Similarly, some third party hardware, or its drivers, are non-standard and don’t
respond properly to standard system calls. Incompatibility with hardware is often
cited as the largest single source of customer complaints into technical support
groups.
• When one programmer tries to fix bugs, or otherwise modify another programmer’s
code, there is a lot of room for miscommunication and error.
• And, sometimes people just make mistakes.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 66
Quality: Family Drug Store
v. Gulf States Computer
(563 So.2d 1324, Louisiana Court of Appeal, 1990). The
basic holding of this case is that a computer program that
is honestly marketed can be unacceptably awkward to
use without imposing liability on the seller.
Two pharmacists bought a computer program known as
the Medical Supply System from Gulf States. After they
realized what they had bought, they asked for, and then
sued for, a refund. Here were some of the problems of
the system:
“1 all data had to be printed out, and could not be viewed
on the monitor;
2 the information on the monitor would appear in code;
3 numerical codes were needed in order to open a new
patient file
4 the system was unable to scroll.”
The court found that the seller had not in any way
misrepresented the system, and that it was not useless
even though it was awkward to use. Further, the price of
the software was about $2500 compared to $10,000 for
other packages. The plaintiffs had gotten what they’d
paid for.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 67
Cem Kaner, Ph.D., J.D. P.O . Box 1 2 0 0
Attorney at Law Santa Clara, CA 9 5 0 5 2
[email protected] 4 0 8 -2 4 4 -7 0 0 0
One discussion that plagues development groups is how serious a bug is. Can we call
it a feature? Does it have to be fixed now or can it wait until the next release? What
are the consequences if we ship it?
This article looks at this issue from a different angle:
How should the law determine whether a bug is serious enough that the
customer should be entitled to cancel the contract, return the software, and
demand a refund?
I’ve been asked to write the first draft of language to include in a new law. More than
any other piece of the new statute, this section will affect the day-to-day interactions
within product development groups. So, I’m asking you to review this proposal and
send me your comments, at [email protected].
[i] Some readers of this magazine might have read my previous paper on Article 2B:
Kaner, C. “Uniform Commercial Code Article 2B: A New Law of Software Quality,”
Software QA, Volume 3, #2, 1996, p. 10.
[ii] American Bar Association, Section on Patent, Trademark, & Copyright Law,
Committee on Computer Programs Model Software Licensing Agreement, 1992.
[i] In legal writing, it is common to use the word “it” instead of “he” or “she”
whenever the being (here, the software developer) is likely to be a corporation
rather than an individual human.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 78
Reporting Errors
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 79
What Are You Reporting?
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 80
The Problem Report Form:
A typical form includes many of the following fields
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 81
Important Parts of the Report
Problem Summary
This one-line description of the problem is the
most important part of the report.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 82
Important Parts of the Report
Can You Reproduce The Problem?
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 84
Bug Reporting:
A Few More Fields
Resolution
The project manager owns this field. Common resolutions include:
• Pending: the bug is still being worked on.
• Fixed: the programmer says it’s fixed. Now you should check it.
• Cannot reproduce: The programmer can’t make the failure happen. Add
details, reset the resolution to Pending, and notify the programmer.
• Deferred: It’s a bug, but we’ll fix it later.
• As Designed: The program works as it’s supposed to.
• Need Info: The programmer needs more info from you. She has probably
asked a question in the comments.
• Duplicate: This is just a repeat of another bug report (XREF it on this report.)
Duplicates should not close until the duplicated bug closes.
• Withdrawn: The tester who reported this bug is withdrawing the report.
Comments
In many of the best databases, there are free-form comments fields that
will take comments from anyone on the project.
• You will get comments (especially questions) from the project manager, the
programmer and tech support. Other groups in your company might also be
allowed to enter their comments.
• This field is especially valuable for recording progress and difficulties with
difficult or politically charged bugs.
• Be cautious about your wording. Just like e-mail and usenet postings, it is
easy to read a joke or a remark as a flame. Never flame.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 85
Editing Bug Reports
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 86
Bug Advocacy
Decision Making,
Information Flow,
and Credibility
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 87
The Signal Detection &
Recognition Problem
Response
Bug Feature
Bug
Hit Miss
Actual event
Feature
False Correct
Alarm Rejection
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 88
Lessons From Signal Detection: We
Make Decisions Under Uncertainty
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 89
Lessons From Signal Detection:
Decisions Are Subject To Bias
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 90
Lessons From Signal Detection:
Decisions Are Subject To Bias
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 91
Decisions Made
During Bug Processing
Bug handling involves many decisions by
different people, such as:
Tester:
• Should I report this bug?
• Should I report these similar bugs as one bug or
many?
• Should I report this awkwardness in the user
interface?
• Should I stop reporting bugs that look minor?
• How much time should I spend on analysis and
styling of this report?
Your decisions will reflect on you. They will
cumulatively have an effect on your credibility,
because they reflect your judgment.
The comprehensibility of your reports and the
extent and skill of your analysis will also have
a substantial impact on your credibility.
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 92
Decisions Made
During Bug Processing-2
Bug handling involves many decisions by
different people, such as:
Programmer:
• Should I fix this bug or defer it?
Project Manager:
• Should I approve the deferral of this bug?
Tester:
• Should I appeal the deferral of this bug?
• How much time should I spend analyzing this bug
further?
Test Group Manager:
• Should I make an issue about this bug?
• Should I encourage my tester to
» investigate the bug further
» argue the bug further,
» or to quit worrying about this one,
» or should I just keep out of the discussion
this time?
Refer to Testing Computer Software, pages 90-97, 115-118
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 93
Decisions Made
During Bug Processing - 3
Customer Service, Marketing, Documentation:
• Should I ask the project manager to reopen this
bug?
• (The tester appealed the deferral) Should I support
the tester this time?
• Should I spend time trying to figure this thing out?
• Will this call for extra work in the answer book /
advertising / manual / help?
Director, Vice President, other senior staff:
• Should I override the project manager’s deferral of
this bug?
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 94
Decisions Made
During Bug Processing - 4
Who else is in your decision loop?
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
____________________________________________
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 95
Watch Out For Issues That Will Bias
People Who Evaluate Bug Reports
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 96
Watch Out For Issues That Will Bias
People Who Evaluate Bug Reports
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 97
Clarify Expectations
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 98
Biasing People Who Report Bugs
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 99
Biasing People Who Report Bugs
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 100
Bug Advocacy
S ta tus Re po r ts
are an effective tool
for bug advocacy
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 101
Project Status
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 102
Project Status
Copyright (c) 1994-2000 Cem Kaner. Licensed under the GNU Free Doc License. 103