Unified modeling language (UML) is a modeling method with object-oriented concept. It has been adopted to be international standard in software modeling field by ISO. More and more attention is paid on the process of design and development based on UML, but, researching on UML test process is paid little attention relatively. Test is very important in software development. Usually, test is about 40% in whole software development process. So, the development of test technology has important meaning for shortening test cycle, reducing maintenance cost and improving software quality. On the background of UML modeling process and object-oriented test technology, the paper put forward a method that express adequate test class on UML model. By this method, we can carry out adequate class test on object-oriented system.In object-oriented program structure, Object-oriented test is usually divided four hierarchies: class method test, class test, class-cluster test, system test. Researching on class test technology, the paper describes a class test method that is based on extended UML Statechart diagram. After analyzing the three aspects shortage in measurability of UML Statechart diagram, the test method adds adequate class test information (the paper use "state-valve" and "class-valve" to describe this information) in it. Then, it becomes extended UML Statechart diagram. For the graphic UML model, a convert tool is implemented for convert UML Statechart diagram into XML structure file. Based on XML file, the class autoimmunization/semi-autoimmunization test can be going on.Based on extended UML Statechart diagram, the paper introduces how to create method sequence (the paper use method's directly succeeding method collection to express it) in class test and carry out class state class. We implement a test tool in the paper for improving the test method's practicality. With the example of one project which the author worked on, this paper introduce the method how to model UML Statechart diagram, design test case and carry out the class test. By proof, adding test information in design model, this method can save tester's workload and shorten the cycle of software test. |