Recent years, with the expansion of computer application field, the requirement forsoftware quality would be increased accordingly in the process of using software. The poorquality of software will lead to various problems. These troubles will further bring differentlevels of consequences, even some serious accidents or property loss. Software testing canensure software quality. Traditional software testing methods already have significantachievements. However, traditional software testing methods cannot be used for testing thesoftware developed by using object-oriented technology. Class is the basic unit of anobject-oriented software system. Thus, it will become a focus in the field of object-orientedsoftware testing without a doubt. In view of this, the paper conducts the following studies:Firstly, some traditional software testing methods have been studied in this paper. Itdescribes the influence of some new features of object-oriented development technologies onsoftware testing, object-oriented software testing model and test-level, the related existingmethods of class testing. It also introduces the existing test case generation methods and classtest generation methods to generate the required test sequence, test data. At last, we made asummary of sufficiency of test case in software testing and coverage criteria of effectiveness.Secondly, test sequence generation technology, that is, the relevant technical knowledgeof UML state diagram is presented. For the test sequence generation, the softwarerequirements specifications would be converted into UML state diagram. Based upon on this,the improved depth-first and breadth-first search are performed to generate test tree. After that,depth-first traversal algorithm is implemented to each leaf node which is also called end state.These ergodic sequences are the needed test sequences that are not redundant and fullycovered. Besides, corresponding test sequences are obtained by analyzing the state diagram ofthe class Engine’s. This shows that the method which is used for generating test sequences isefficient and fast.Finally, Metropolis principle in simulated annealing algorithm is introduced into geneticalgorithm selection phase in this paper. These two algorithms are mixed to automaticallygenerate test data. Experiment with the classic triangle type determination program isconducted by us, two paths in which the output type is isosceles triangle and general triangleare selected. Experimental results prove that the simulated annealing algorithm and geneticalgorithm are mixed to achieve complementary advantages, to achieve testing requirementsthat covering the specified path in the relatively small number of iterations. |