Software testing is an important guarantee to improve software quality andreliability,occupies a very important position in the whole software development . With theautomate request of software testing and the extensive using of object-oriented technology ,Unified Modeling Language (UML) with its well-defined, easily expressed and powerfulfeatures, becomes a hot study, and is widely used in the software testing. Automated softwaretesting can effectively reduce testing works and software development costs, the automaticgeneration of test cases is the core of software testing.In this context ,based on the basis of existing theory, through extensive research andstudy, we propose a method of combined UML use case diagram and activity diagram togenerate test cases .First ,this paper details the software testing concepts, methods, principles and strategiesand so on. Then describes some of the classic models of software testing, and through thecomparison of various models, points out the advantages of UML models in the test.Thendoes a detailed analysis of the UML use case diagram and activity diagram, and indicatestesting problems and solutions of these diagrams . This paper presents using activity diagramto describe use case instead of using text to depict use case specification .Then introduce antcolony algorithm and improve it combined with this paper . Then compress the structure ofconcurrent of activity diagram based on formal definition, transform use case diagram andactivity diagram into UDG and ADG respectively, integrate UDG and ADG into system testgraph (STG). This paper designes a Test-Generation algorithm to generate test cases based onSTG, which visiting STG is a sub-level visit .In order to control the local process ofgenerating test cases, introduce improved ant colony algorithm to remove redundant test casesand examples of activities Figure, improve test efficiency .Finally through the concreteexperiment to verify the method.The results of simulation show that the method of integrating use case diagram andactivity diagram can achieve the interaction of System and actors, complete test information.Compress complicated structure of activity diagram can reduce the complexity of the test,while the introduction of improved ACO instances the compressed structure of activitydiagram, in order to avoid the test paths explosion problem caused by complicated nodes array .When Test-Generation algorithm visit STG generating test cases, the introduction of improvedant colony algorithm can effectively control the redundancy test case generation based onactivity diagram. In short, this method not only satisfy the testing requirement, but also ensurethe integrity of the number of test cases. |