With the development of all kinds of large software systems, the number of errors resulted from them have also increased. So it is necessary to explore some methods to inspect these errors, which are called as software test. And software test plays a very important role in reducing the cost of software development, and it is also a key part in Software Engineering. Especially in some software systems with a lot of human-machine interactive operations, such as CAD system, auto-generating test cases are one of the best methods to test themOur research is supported by a national 863 research project which is named as Research on Automatic Test Technology for 3-Dimensions CAD System (Project No. is 2002AA411510). And in this thesis we present our methods to generate software test cases automaticlly, which are based on UML Statecharts specification of software. And the operational semantics about UML Statecharts and its hierarchy structure are described in this thesis. Our main works are listed as follows,(1) On the bases of Li LiuYing's definitions on operational semantics of UML Statecharts, we add some definitions on transition linked by junction pseudostate, and describe the transition definition as transition structure, which will make it more suitable for software testing and the formal semantics, and these definitions are much easier to be expanded.(2) Based on structural definition of transition relationship, we present our methods used in testing compound transition linked by fork, join, junction, choice pseudostate etc. in this thesis.(3) Based on hierarchical structure of UML Statechart, a hierachical test cases generation method for UML Statechart according to its hierarchy is presented. Conflicted transitions in statues' enabled transition set may influence test cases execution. Accordingly, a new method that inserting sub-sequence in test case is set forth to deal with this problem.(4) In order to satisfy testing requirements, state coverage criterion, transitioncoverage criterion, predicate coverage criterion, full predicate coverage criterion and predicate partition coverage criterion are defined. With these coverage criterions, algorithms for automatic generating test cases are brought forward. To assist test case generation, split tree algorithm for DNF formal is presented in the thesis.(5) Based on research work listed upon, the author implemented an automatic test cases generation system for UML Statecharts. |