Font Size: a A A

Research On Activity Diagram Polymorphic Test Method With OCL Constraints

Posted on:2013-08-16Degree:MasterType:Thesis
Country:ChinaCandidate:N DingFull Text:PDF
GTID:2248330362474073Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Nowadays, software testing based on UML model has become an important trendof object-oriented software testing. UML is a popular object-oriented modelinglanguage, and its activity diagram, which is an important basis for integration testingand system testing, can be used to describe the system workflow and parallel activities.Although providing a flexible modeling method, UML, as a semiformal modelinglanguage, cannot accurately describe the system model. And UML leads to the fact thatexisting researches on testing usually overlook the polymorphism, because it cannotdescribe the polymorphism directly. In such a context, this paper investigates themethods of generating polymorphic test cases based on activity diagram, and realizesthe test to polymorphism in object-oriented software. It has a great significance both intheory and in technology.Starting from UML constraints extension mechanism, using OCL to describe themodel elements constraints, this paper obtains the accurate UML model. In order to getthe polymorphic test cases from the UML models, this paper studies the structureinformation of class diagram, activity diagram, and the way of adding the OCLconstraints into class diagram, then proposes a method of formalizing the class diagramand activity diagram, and gives the concrete formalized definition. This paper alsofurther investigates the related aspects of the object-oriented design principles anddesign patterns, analyze the resons of polymorphism, and extracts the polymorphicinformation-class sets polymorphic method (CSPM) from the class diagram accordingto the inherited information of class diagram, Liskov substitution principle and OCLconstraints. For the reason that the activity nodes in activity diagram can correspond tothe methods in class diagram, this paper adds OCL constraints into activity diagram, andfigures out the polymorphic expansion activity diagram model with OCL by using theCSPM to seek and expand the polymorphic node of activity diagram. Some coveragecriteria are formulated on the basis of analyzing the polymorphic nodes, structure ofbranch, loop and concurrent and giving the processing strategy of constructing test clues.The polymorphic test clues are generated by traversing the polymorphic expansionactivity diagram with the coverage criterion. Test data sets can be constructed for thepolymorphic test clues which needs input variant by using the equivalence partitioningand boundary value analysis methods combined the OCL constraints in class diagram. At last, the composed strategy of test data is designed, and the final integrated test casesare generated by combining the composed test data and polymorphic test clues.Based on the idea mentioned above, this paper designs the polymorphic testframework based on activity diagram and investigates the main modules of theframework and the technology of implementation in a profound way. On the basis ofin-depth analyzing the model file structure of modeling tool ArgoUML, we develop atool prototype based on the framework. Finally, the results supported by the experimentsusing this tool show that test cases generated by using the method in this paper can testthe polymorphism and it also has a greate significance to improve the adequacy ofobject-oriented software tesing.
Keywords/Search Tags:UML, OCL, Polymorphism, Activity Diagram, Test Cases
PDF Full Text Request
Related items