A Method of Test Case Optimization Based on Improved Simulated Annealing Genetic Algorithm
Different from procedure-oriented software, object-oriented program has encapsulation, inheritance and polymorphism. The methods of classes in object-oriented program may call the objects of other classes. But it is too difficult to get the real objects state. And because of its inheritance and polymorphism, there may have a variety of program execution path. It is difficult to achieve satisfy the test coverage if it use the conventional method to generate the test cases. Aiming at this problem, proposes an approach of object-oriented program unit test case generation based on improved simulated annealing genetic algorithm. The test sequences optimized by simulated annealing ge-netic algorithm can cover more branches in the program, the generated test cases will have higher coverage. Finally, the feasibility of the method is verified by the experiments and compared with other methods. Experimental results show that the proposed approach has higher branch coverage.
Test Case GenerationMethod-Call SequenceSimulated Annealing Genetic AlgorithmsBranch Coverage