Database Reference
In-Depth Information
code. Regression testing involves four issues: change impact identifi cation, test suite main-
tenance, test strategy, and test case selection. Change impact identifi cation involves locating
all the modules and other program segments that are affected by the modifi cation. Test suite
maintenance attempts to keep the test suite status current and reusable for future revalidation.
Test strategy involves fi nding a test sequence for retesting the software. Test case selection
attempts to reduce the cost of regression testing by selecting a subset of the test suite that
has been used during the application development. This subset of tests is then used to test
modifi ed programs (Rothermel & Harold, 1998).
In database applications a number of new features are supported, such as Structured
Query Language (SQL) statements, table constraints, exception handling, and table triggers.
These features introduce new diffi culties that hinder regression test selection. In this work,
we concentrate on impact analysis and test selection for SQL-based systems. Regression
testing is necessary for assuring the quality of a system after modifying it. Ad hoc regres-
sion testing involves either rerunning all the test cases that are included in the test suite
determined during the initial development of software (Select-All approach) or selecting a
random subset of this initial test suite (Select-Random approach). But, the Select-Random
approach is unreliable, since it might miss selecting test cases that reveal adverse effects
of modifi cations. Hence, the Select-Random approach might compromise the quality of
the modifi ed system. On the other hand, the Select-All approach is expensive in terms of
time and cost, since it usually includes many test cases that do not reveal the impact of the
modifi cation made to the system. Therefore, it is important to use regression testing methods
that reduce the number of selected test cases in order to save time and money, especially for
large software systems, while maintaining the quality of the system (Wong et al., 1997).
SQL, the standard query language, is a declarative language used for the manipulation
of table data in database applications. It stands as the heart of database applications mod-
ules (ISO/IEC 9075, 1992). The usage of SQL in a procedural context has its implications.
We categorize these implications into three categories: control dependencies, data fl ow
dependencies, and component dependencies. The nature of SQL and the existence of table
constraints lead to using exception handling techniques in database modules. Exception
handling complicates control fl ow dependencies between statements in database modules.
This complexity should be handled in the process of applying control fl ow-based regression
testing techniques. Moreover, table triggers fi rings because of modifying SQL statements
create implicit inter-modular control fl ow dependencies between modules. These dependen-
cies should be explored for performing inter-module regression testing.
The manipulation of database tables by different modules, using SQL, leads to a state-
based behavior of modules. It also creates data fl ow dependencies between the modules.
The dynamic behavior of SQL, in which the exact table rows manipulated is not known
until run-time, makes it very diffi cult to trace such data dependencies. Furthermore, SQL
manipulates database components such as tables and views. These facts create component
dependencies between the various components handled by SQL statements and the modules
in which the statements are located. These component dependency relations are transitive.
Whenever a change is made to one component, this transitivity introduces a ripple effect
of change.
In this chapter, we propose a new two-phase methodology for regression testing SQL-
based database applications. Phase 1 involves detecting modifi cations and performing change
impact analysis. The impact analysis technique localizes the effects of change, identifi es all
the affected components, and selects a preliminary set of test cases that traverse modifi ed
Search WWH ::




Custom Search