You are on page 1of 1

2011 27th IEEE International Conference on Software Maintenance (ICSM)

3UDFWLFDO&RPELQDWRULDO WZD\ 0HWKRGVIRU'HWHFWLQJ


&RPSOH[)DXOWVLQ5HJUHVVLRQ7HVWLQJ
Rick Kuhn (kuhn@nist.gov) and Raghu Kacker (raghu.kacker@nist.gov)
National Institute of Standards and Technology
Gaithersburg, MD 20899

Abstract— Regression testing can be among the most These results suggest that combinatorial testing which
challenging of software assurance tasks because program exercises a high degree (4-way or above) of combinatorial
changes often introduce faults, including unexpected interactions is necessary to reach a higher level of software
interactions among different parts of the code. Unanticipated assurance. If we know from experience that t or fewer
interactions may also occur when software is modified for a variables are involved in failures for a particular application
new platform. Techniques such as pairwise testing are not type and we can test all t-way combinations of discrete
sufficient for detecting these faults, because empirical variable settings, then we can have reasonably high confidence
evidence shows that some errors are triggered only by the that the application will function correctly.
interaction of three, four, or more parameters. However, new
algorithms and tools make it possible to generate tests that
cover complex combinations of values (2-way to 6-way), or to
analyze existing test suites and automatically generate tests
that provide combinatorial coverage. The key advantage of
this approach is that it produces better testing using a fraction
of the tests required by other methods.
Keywords-combinatorial testing; regression testing; coverage;
I. INTRODUCTION
Developers of large data-intensive software often notice an
interesting—though not surprising—phenomenon: after a
minor change, components that have operated for months
without trouble suddenly develop previously undetected Figure 1. Percentage failures triggered by t-way interactions
errors. For example, the application may have been installed
II. HOW DOES COMBINATORIAL TESTING WORK?
on a different OS-hardware-DBMS-networking platform, or
newly added features fail on an oddball combination of values The key ingredient for this form of testing is known as a
that have not occurred before. Some of these rare covering array, a mathematical object in which all t-way
combinations trigger failures that have escaped extensive combinations of parameter values are covered at least once.
regression testing. Such failures are known as interaction Generating covering arrays for complex interactions (beyond
failures, because they are only exposed when two or more pairwise) is a difficult problem, but new algorithms have been
input values interact to cause the program to reach an incorrect developed that make it possible to generate covering arrays
result. Recognizing that system failures can result from the several orders of magnitude faster than previous algorithms.
interaction of conditions that might be innocuous individually, These algorithms have been incorporated into practical tools
software developers have long used “pairwise testing”, in that are used by hundreds of organizations.
which all possible pairs of parameter values are covered by at Covering arrays can be used in initial unit or system testing,
least one test. But what about the remaining faults? How but new methods and tools have been developed to analyze an
many failures will be triggered only by an unusual existing test suite, produce detailed measurements of its
combinatorial interaction of more than two parameters? combinatorial coverage, and automatically extend it to achieve
any desired combinatorial coverage up to 100%. These tools
A study of 15 years of medical device software failures make combinatorial testing significantly easier to accomplish
found one case in which a failure involved a four-way in regression testing, or to integrate this advanced testing
interaction between parameter values. Subsequent approach into a traditional testing paradigm.
investigations found a similar distribution of failure-triggering Combinatorial testing has spread rapidly because it can
conditions: usually, many were caused by a single parameter produce better testing at lower cost. More than 700
value, a smaller proportion resulted from an interaction organizations use NIST’s tools, and others, such as Microsoft
between two parameter values, and progressively fewer were PICT, have similarly large user bases. This tutorial seeks to
triggered by 3, 4, 5, and 6-way interactions (Figure 1), a increase awareness of this effective test approach, and equip
relationship we refer to as the interaction rule. regression testers with knowledge and tools to apply it to
testing and assurance in software maintenance.

U.S. Government work not protected by U.S. copyright


599

You might also like