Abstract

Test data generation is always a hot topic in software testing since efficient test data generation method can significantly increase the efficiency of software testing and decrease the cost. Method call relation and parameter list are seldom considered in existing test data generation methods for object-oriented programs. In this paper, we present the concept of complete testing chain which stipulates the order of methods to be followed when generating test data for object-oriented programs to guarantee the correctness of test data generation. Basing on this, a framework for test data generation of object-oriented programs is proposed. We discuss encoding paradigm of test data, updating of test data and design of fitness function. For updating of test data, particle swarm optimization is introduced to realize the update of parameter list with genetic algorithm used for method sequence updating. Last but not least, a method to improve the initial population by using generated test data is presented for programs whose branch statements consist of method calls. The results show that the proposed methods can greatly increase the success rate and efficiency of test data generation for object-oriented programs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call