The Proposed Solution

When presented with problems of programming style, a natural solution is to seek to transform the program to remove the problem. In the context of improving testability, this will be termed `testability transformation'. The TeTra project will focus on testability transformations for improving evolutionary testing by removing unstructured control flow, side effects and use of flag variables. Poor structure and side effects are well-known from other fields of study, for example, comprehension and maintenance. However, existing transformations for ameliorating such problems will need to be adapted to be applicable to testability transformation. The flag problem is less well studied from a transformational point of view and so this application too, will require the development of novel transformation algorithms.

There is an apparent paradox at the heart of this proposal:

Structural testing is based upon structurally defined test adequacy criteria. The automated generation of test data to satisfy these criteria can be impeded by properties of the software (for example, flags, side effects, and unstructured control flow). Testability transformation seeks to remove the problem by transforming the program so that it becomes easier to generate adequate test data. However, transformation alters the structure of the program. Since the program's structure is altered and the adequacy criteria is structurally defined, it would appear that the original test adequacy criterion may no longer apply.

Testability transformation therefore requires co-transformation of the adequacy criterion; this avoids the apparent paradox. An (informal) definition of a testability transformation is given below:

Definition 1   Testability Transformation
A Testability transformation maps a program, $p$ and its associated test adequacy criterion, $c$ to a new program $p'$ and new adequacy criterion, $c'$, such that any set of test data which is adequate for $p'$ with respect to $c'$ is also adequate for $p$ with respect to $c$.

Observe that, while traditional transformations are meaning preserving functions on programs, testability transformations are `test set preserving' functions on pairs containing both a program and its associated adequacy criterion. Therefore, TeTra will construct transformations which allow the test adequacy criterion to be re-formulated so that it preserves the meaning of the original adequacy criterion with respect to the original program. The definition of transformation rules and algorithms based upon this new notion of transformation is the essential research challenge which underpins the TeTra project.


Mark Harman, Department of Information Systems and Computing, Brunel University, Uxbridge, Middlesex, UB8 3PH.