MuJava : An Automated Class Mutation System Yu-Seung Ma 1* , Jeff Offutt 2 , and Yong Rae Kwon 1 1 Division of Computer Science Department of Electrical Engineering and Computer Science Korea Advanced Institute of Science and Technology, Korea {ysma, kwon}@salmosa.kaist.ac.kr 2 Department of Information and Software Engineering George Mason University ofut@ise.gmu.edu Abstract Several module and class testing techniques have been applied to object-oriented programs, but researchers have only recently begun developing test criteria that evaluate the use of key OO features such as inheritance, polymorphism, and encapsulation. Mutation testing is a powerful testing technique for generating software tests and evaluating the quality of software. However, the cost of mutation testing has traditionally been so high it cannot be applied without full automated tool support. This paper presents a method to reduce the execution cost of mutation testing for OO programs by using two key technologies, Mutant Schemata Generation (MSG) and bytecode translation. This method adapts the existing MSG method for mutants that change the program behavior and uses bytecode translation for mutants that change the program structure. A key advantage is in performance: only two compilations are required and both the compilation and execution time for each is greatly reduced. A mutation tool based on the MSG/bytecode translation method has been built and used to measure the speedup over the separate compilation approach. Experimental results show that the MSG/bytecode translation method is about five times faster than separate compilation. Keywords Object-Oriented Programs, Mutation Testing, Software Testing 1 Introduction Object-oriented design, programming, and languages offer many advantages to software developers and provide solutions to old problems. However, the novel object-oriented language features introduce new kinds of problems that in some cases require novel solutions [6]. Researchers have been developing new methods and techniques to test object-oriented software for a number of years. Early work focused on testing of data abstractions and state behavior [7, 20, 21, 24, 31, 40, 55, 58]. Subsequent work looked into testing of classes and issues such as what kind and how many objects should be instantiated and in what order classes should be tested [8, 9, 26, 39]. More recently, researchers have looked at integration issues of OO software and testing of complete classes [23, 27, 28, 54]. * Supported in part by the Korean Science and Engineering Foundation under grant GH15420 to KAIST. Supported in part by the U.S. National Science Foundation under grant CCR-98-04111 to George Mason University. 1