With the increase of the software scale and the maturity of the software technology,the requirement for the software quality becomes higher and higher. Software testing isan effectiveness guarantee for the software quality. UML is an object-oriented standardmodeling language, which includes a series of view and model and can systematicallydescribe the system structure and behavior in multi-level and multi-angle. Thereforesoftware testing based on UML model is always the key point of the research and hasbeen widely used in object-oriented software development and testing.At present, researches based on UML model test case generation are focus on oneof the views, including the activity diagram, the sequence diagram and the statediagram, which cannot connect all the views of a UML model and thus make the testingincomplete and inadequate. The state diagram describes the state migration of oneobject under the event-driven and lacks the mutual information between multipleobjects; the sequence diagram describes the mutual information between objects andlacks the migration information of objects. In order to generate the test case based onUML model more completely, we propose a test case generation method based on thecombination of the UML state diagram and the sequence diagram and apply thismethod to the test case generation of a mobile medical system project.This thesis starts with building state diagram and sequence diagram models so asto study the migration of data objects in state diagram. Under the circumstances whenthe objects are triggered by messages, the sequence diagram will be added to the statediagram, thus forming a combined diagram. Then the messages and the related objectswill be simplified as connected nodes, transforming the combined diagram intodirected graph. Next, this thesis combine cycle structure to generate optimal testingpath algorithm of the combined model diagram of state diagram and sequencediagram, and then designs coverage criteria targeting the concurrence, branch, andnesting structure of the combined diagram, based on optimal path algorithm in cyclestructure. Finally, the thesis constructs testing data by means of equivalence partitioning and boundary value analysis, thus producing relatively complete testingsamples. |