Home > Software Quality Tips > Software Quality Book Excerpts > Perfect Software, Ch. 8: What Makes a Good Test
Software Quality Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SOFTWARE QUALITY BOOK EXCERPTS

Perfect Software, Ch. 8: What Makes a Good Test


G.M. Weinberg
03.11.2009
Rating: --- (out of 5)


Software quality news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Perfect Software cover "What Makes a Good Test" (PDF) is reprinted by permission of Dorset House Publishing from G.M. Weinberg, Perfect Software, pp. 67-73. Copyright (c) 2008. All rights reserved.

Download the full chapter.

Buy Perfect Software.



"There is nothing either good or bad,
but thinking makes it so."
-- William Shakespeare, English Dramatist and Poet
(1564--1616), Hamlet, Act 2, Scene 2.

What makes a good test? The question can be answered at a highly technical level, but that's not our goal here. In fact, it's helpful to step back from that debate and look at the question from a management point of view. How can you know if testing is being done well? How much credence can you put in test results?

You can never know for sure.

You may or may not agree with Hamlet that there is nothing either good or bad. For the sake of argument, though, let's suppose there is such a thing as a "good" test and ask the question, How can one know whether a particular test (or set of tests) is, indeed, good? Let's start with something even better than "good" by looking at a definition of "perfect." A perfect set of tests would have the following characteristics:

a. It would detect every bug in a system.
b. It would never detect a non-bug as a bug.
c. It would give us complete confidence that it has done a and b.
d. It would accomplish a, b, and c quickly and cheaply enough for our needs.

Now consider a system under test. In the simplest case, if that system were perfectly bug free (a situation likely to exist only in our dreams), then any test that finds no bugs meets condition a. Some tests that we would consider really lousy could meet that condition as well, but when run against a bug-free, perfect system, they would look pretty good.

Or would they? We don't know in advance whether we're testing a bug-free system or a lousy system. (If we did, why would we need to test?) So, imagine two sets of tests: perfect tests and lousy tests. When run against our bug-free, perfect system, both sets of tests reveal no bugs. So, on the basis of their bugfinding alone, we couldn't tell the difference between a perfect test and a lousy test.

In fact, what might be an adequate test for one implementation of a system might be a lousy test for another implementation of the same system. In other words, "goodness" cannot be a property of a test, but only a property of the relationship between a test and an implementation.

Going one step further, the same test of the same implementation might be adequate for one organization but lousy for another. For example, a test that is adequate for a system to be used internally by a single organization might be totally inadequate if the same implementation were sold as a software product to a thousand organizations. In other words, "goodness" cannot be a property of tests and implementations, but only a property of the relationship among tests, implementations, and situations.

So, you can never tell for sure, and you never can tell by looking at a test in isolation, whether a test is good -- but you do have many ways to tell whether a test is likely to be bad. Metatests play an important role. Later, in Chapter 9, we examine some indicators of "bad" tests.

You can assess goodness only after the fact.

If you knew how many bugs were in a system, you could at least begin to assess the goodness, or not-badness, of a set of tests. For instance, after a system has been in use for a few years, a prudent manager will have statistics on how many bugs were shipped with the system. By keeping track of what bugs turn up in use, then analyzing them to see what they're like, you will have at least some kinds of information, such as,

  • how good your testing was, and in what ways
  • how testing might be improved in the future
  • what kinds of bugs your testing characteristically missed

Knowing such information allows you to make better estimates in the future, even if you don't improve your testing process. Such information may also be used to improve the development process -- although in this regard, most likely I'm dreaming again.

Download the full chapter for more ways to assess the quality of your tests and a list of common testing mistakes.


Rate this Tip
To rate tips, you must be a member of SearchSoftwareQuality.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Software Quality Book Excerpts
Seven Steps to Mastering Business Analysis, Ch. 1
Clean Code: A Handbook of Agile Software Craftsmanship, Chapter 1 -- What Is Clean Code?
The Software Project Manager's Bridge to Agility: Chapter 5, Scope Management
Software Security Engineering: A Guide for Project Managers -- Chapter 3, Requirements Engineering for Secure Software
Requirements Management Using IBM Rational RequisitePro: Chapter 1, Requirements Management
Implementing ITIL Configuration Management: Chapter 3, Determining Scope, Span and Granularity
Agile Software Development: The Cooperative Game, 2nd Edition -- Chapter 3, Communicating, Cooperating Teams
Inherent Quality Simplicity, Section V: The Evolution
Managing the Test People, Chapter 6: Keeping Your Beast Effective
Mastering the Requirements Process, 2nd Edition: Chapter 2, The Requirements Process

Software test design
How to create performance testing workload models
CA's APM solution helps JN Data address performance issues
Parasoft Concerto targets policy-driven development
Why automated software testing fails and pitfalls to avoid
Essentials of static source code analysis for Web applications
Leaner test cases speed test planning, design
Streamlining test planning and design
Conformiq taps multi-core power for automated test case design
How test managers can shine in agile development: Tutorial, part two
Testing mobile Web applications for usability and context

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
gray box  (SearchSoftwareQuality.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Software Design & Testing - Project Management
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts