CHAI Yu-mei, FENG Qiu-yan, WANG Li-ming. Research on Methods for Generating Test Cases of Inter-Classes Interaction Based on UML Models and OCL Constraints[J]. Acta Electronica Sinica, 2013, 41(6): 1242-1248.
DOI:
CHAI Yu-mei, FENG Qiu-yan, WANG Li-ming. Research on Methods for Generating Test Cases of Inter-Classes Interaction Based on UML Models and OCL Constraints[J]. Acta Electronica Sinica, 2013, 41(6): 1242-1248. DOI: 10.3969/j.issn.0372-2112.2013.06.032.
Research on Methods for Generating Test Cases of Inter-Classes Interaction Based on UML Models and OCL Constraints
There are some features in object-oriented software
such as classes
encapsulation
inheritance
and dynamic connections.They make the division of object-oriented testing procedures and the choice of strategy different from traditional testing ideas.According to the characteristics of object-oriented software
the paper adopts the methods based on models for testing software and adds OCL(Object Constraints Language)constraints for sequence diagram of UML(United Model Language)design model and tests interaction among classes.The paper proposes the algorithm for generating EG(Execution Graph)and transforms SD(Sequence Diagram) to EG
and SD is constrainted by OCL for testing interaction among classes.In this algorithm
the testing problem for four major combined fragments including alt
loop
opt
break in the new features
and their nesting among them and the polymorphism
will be solved in sequence diagram of UML 2.0.In order to get the smallest complete test pathes
strategy for traversing EG and algorithm for generating test paths are presented.Finally
the paper proposes algorithm for determining test scenarios by testing pathes
deleting invalid scenarios by OCL constraints
and generating test cases.Experimental validation shows that our solution can test software based on UML sequence diagram and OCL.