The Computer Journal Advance Access originally published online on May 3, 2005
The Computer Journal 2005 48(4):421-436; doi:10.1093/comjnl/bxh093
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Branch-Coverage Testability Transformation for Unstructured Programs
1 Department of Information Systems and Computing, Brunel University, Uxbridge, Middlesex UB8 3PH, UK, 2 Department of Computer Science, King's College London, Strand, London WC2R 2LS, UK, 3 Department of Computer Science, University of Essex, Colchester CO4 3SQ, UK
Test data generation by hand is a tedious, expensive and error-prone activity, yet testing is a vital part of the development process. Several techniques have been proposed to automate the generation of test data, but all of these are hindered by the presence of unstructured control flow. This paper addresses the problem using testability transformation. Testability transformation does not preserve the traditional meaning of the program, rather it deals with preserving test-adequate sets of input data. This requires new equivalence relations which, in turn, entail novel proof obligations. The paper illustrates this using the branch coverage adequacy criterion and develops a branch adequacy equivalence relation and a testability transformation for restructuring. It then presents a proof that the transformation preserves branch adequacy.
Received 29 April 2004. revised 24 January 2005.