TestFilter: A Statement-Coverage Based Test Case
Reduction Technique
Saif-ur-Rehman Khan1, Aamer Nadeem2
Center for Software Dependabilit, Mohammad Ali Jinnah University, Islamabad, Pakistan.
contact2saif@yahoo.com, anadeem@jinnah.edu.pk
Ali Awais, COMSATS Institute of Information Technology, Islamabad Campus, Pakistan.
ali.awaisghotmail.com
Abstract- Software testing is an important but expensive
phase of software development life cycle. During software
testing and retesting, development organizations always
desire to validate the software from different views. But
exhaustive testing requires program execution with all
possible combinations of values for program variables,
which is impractical due to resource constraints. For many
applications, it is possible to generate test cases
automatically. But the core problem is the selection of
effective test cases necessary to validate the program
during the maintenance phase. This target can only be
achieved by eliminating all the redundant test cases from
the generated pool of test suites. In this paper, we propose
a novel test case reduction technique called TestFilter that
uses the statement-coverage criterion for reduction of test
cases. To demonstrate the applicability of this approach,
we conduct an experimental study. The results show that
our technique is beneficial in identifying non-redundant
test cases at a little cost. Ultimately it is beneficial to
optimize time & cost spent on testing and it is also helpful
during regression testing.
Keywords: Software testing, testing efficiency, test case
reduction.
I. INTRODUCTION
Software testing is an important but expensive phase of
Software Development Life Cycle (SDLC). Exhaustive testing
provides more confidence about the quality and reliability of
the developed software during maintenance phase. In this
technique, Test manager executes the programs with all
infinite combinations of values for program variables [1].
Generally the domain of a program is infinite and cannot be
used as a test data.
According to Rothermel et. al. [2] the product of about
20,000 lines of code requires seven weeks to run all its test
cases and costs several hundred thousands dollars to execute
them.
Generally development organizations cannot afford such
exhaustive testing, rather than they are forced to accommodate
the inherent complexities of other phases of SDLC also in the
testing phase. Ultimately they choose test case optimization as
a solution of all these problems.
A test case is defined in IEEE standard as [3]: "A set of test
inputs, execution, and expected results developed for a
particular objective, such as to exercise a particular program
path or to verify compliance with a specific requirement".
While a test suite is a combination of test cases. The quality of
a test suite is measured through following four factors: 1) its
fault coverage, 2) its code coverage, 3) its size, and 4) the
number of faults detected by the most effective test contained
in it [4].
For many applications, it is possible to generate test cases
automatically. Formalization of requirements and design
documents additionally permits automation of test execution
and evaluation process [6]. But core problem is selection of
effective test cases necessary to validate the program during
maintenance phase. This can be done by identifying and
eliminating redundant test cases from all generated test suites.
Note, a test case is redundant, if it tests the same portion of
code as tested by other test case (s) of that test suite [3].
Test manager can eliminate these redundant test cases
using random or adhoc techniques. But this discarding
capability can be challenged and there is an arbitrarily high
risk of eliminating all tests that reveal an error of high severity
from the code. Test Case Reduction (TCR) techniques helps
test manager to find out representative set of test cases at little
cost [5]. By doing this, we can reduce the test case execution,
management, and storage cost. Ultimately, it helps to
accommodate the delays and cost overrun of other phases of
SDLC.
In this paper, we propose a novel test case reduction
technique, called TestFilter. This technique selects test cases
based on their statement-coverage (i.e., weight). Note, weight
1-4244-0794-X/06/$20.00 ©2006 IEEE
275
Authorized licensed use limited to: COMSATS INSTITUTE OF INFORMATION TECHNOLOGY. Downloaded on July 23, 2009 at 03:14 from IEEE Xplore. Restrictions apply.