Font Size: a A A

Automatic Cases Generation For Classes Test

Posted on:2009-01-12Degree:MasterType:Thesis
Country:ChinaCandidate:X ZhangFull Text:PDF
GTID:2178360245965681Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Object-oriented software test is an important step in guaranteeing the quality and reliability of object-oriented software. With the fast development of object-oriented software techniques, the traditional means of software testing has failed to fit into object-oriented characters, object-oriented software testing techniques are highly urgent.The object-oriented software testing contains four levels: algorithmic level, class level, cluster level and system level. The class level testing is indispensable, and the selection of test cases is a difficulty. Whether the errors of programs can be detected or not is directly related to correctness of the test cases. Although some methods are brought out to automatically generate test cases, there are no perfect solutions because of their localizations in the practical application. Test cases can only be gained by experiences. Based on the literature reviews about automatic test cases generation, this thesis proposes a method for automatic test cases generation for classes, and implements an automatic test cases generation system using this method.We analyze the ways of automatic test cases generation, and design the methods of class test cases and the class level testing strategies. We discuss the two components of class test cases: test sequences and test data. We propose methods for generating test sequences on UML statechart and generating test data on Genetic Algorithm. We elaborate on the means of flattening UML statechart with intercurrent structure into Extended Finite State Machine without intercurrent structure, construct test sequences, which satisfy the state transition coverage based on EFSM. We investigate basic realization process to build test data on an assigned test sequence using Genetic Algorithm as core research strategy, puts forward methods to build fitness functions which are the unique interface of Genetic Algorithm and test issues, and improves Genetic Algorithm by using the Fitness Zoom method, which not only solves the easy "premature" problem of Genetic Algorithm, but also accelerates the convergence rate of the algorithm and increased the searching efficiency.Using Genetic Algorithm as the basic algorithm, we design and implement an automatic class test data generating system, which is based on appointed test sequence, and verifies the system with a coffee vending machine program. By the experiment, the advantage of the system is proved.
Keywords/Search Tags:test cases generation, UML statechart, Extended Finite State Machine, Genetic Algorithm, fitness function
PDF Full Text Request
Related items