Download Implementation of a Transformation Algorithm
Transcript
Kiran Lakhotia MSc Individual Project Report September 2005 Abstract Metaheuristic search techniques are the preferred method for automatically generating good quality test data for structural testing. However these techniques fail in the presence of flag variables because they turn them into a random search. A testability transformation has been developed to address the problem caused by loop assigned flags in particular, as they have not been included in other solutions to the flag problem. The transformations convert predicates containing loop assigned flags into flag free equivalents, while preserving test data adequacy. Previous work has shown the effectiveness of the transformations when used in conjunction with a genetic algorithm to generate test data. However, no research has been done to investigate the extend by which the transformation increase the size of a program. The tool developed as part of this project is used to evaluate the transformations with respect to any increase in size, measured in lines of code. In total five ‘real world’ programs containing loop assigned flags were transformed by the tool. The paper presents empirical data showing that the increase in size is not highly statistically significant. The paper also presents an empirical study, showing that the ability of the tool to detect loop assigned flags in ‘real world’ code is around 94 percent. III