Test Automation Meets Static Analysis
Author: Jan Peleska and Helge Löding
Abstract:
In this article we advocate an integrated approach for the automation of
(module) testing and static analysis. From the users' perspective, this is
motivated by the fact that module testing and code inspections should be
performed in the same verification stage of a project, and static analysis
is usually seen as an integral part of the code inspection process.
Moreover, it is advisable that the persons performing the test
simultaneously perform the inspections, since the more intimate knowledge of
the unit under test, which is usually gained from the inspections, helps to
specify more relevant test data and more comprehensive test oracles. From
the tool builders' perspective, it turns out that the algorithms and data
structures needed for automated test case / test data generation
are equally useful for a wide range of static analysis objectives, such as
the identification of potential run-time errors or the ``light-weight''
verification of post conditions and intermediate assertions.
The substantiation of this claim is the main topic of this article. We give
an overview of the techniques required for module testing of software units
operating on atomic boolean, integral, string and floating point data types,
and mixed structures and arrays thereof. Then it is illustrated how the test
case generation problem to be solved for automatically generating white-box
test data is equivalent to certain problems of static analysis, when
augmenting the program code of the unit under test for analysis purposes.
PDF file
(169KB)