Font Size: a A A

Research Of Test Method Based On Uml State Diagram With OCL

Posted on:2011-10-06Degree:MasterType:Thesis
Country:ChinaCandidate:Y X ChaiFull Text:PDF
GTID:2178360308958830Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
With wide spreading of computer application, the most concern in Software Engineering is the software quality which highly relies on the effective software testing. In recent years, Unified Modeling Language (UML) stands out in numerous software testing techniques, due to its advantage of comprehensive description of software project. However UML is a kind of semi-formal language, which cannot accurately describe the event constraints, especially for the dynamic view, such as UML state diagram. Moreover, the standard UML modeling tools can only verify the static coherence of events , but it is unable to verify the dynamically change of data which is caused by dynamic execution of some functions that lead to great insufficiency of test-case completeness. Whereas the formal constraint language serve as an effective complement and help testers understand the system test, and then further improve the test access rate and coverage rate of test-case. Thus, it is necessary to add formal language into current UML model.At present, the most popular formal languages are OCL, Z and Object-Z. In which, Z is not object-oriented language; Object-Z language's expression is closed to the mathematical methods which is difficult to understand for programmer, and the conditions of event constraint also need to be calculated; The style of OCL is similar to programming language, which is easier to be accepted by programmers and the most important point is that the pre&post conditions are explicitly given in OCL for easily using.Current research results based on UML/OCL testing show that most of them follow the process as below: firstly, get the test sequences of the UML model, and then combine OCL document to generate test cases. In this case, test cases cannot be generated automatically. Therefore, this dissertation complete the work on the perspective of the software testing technology, UML state diagrams, OCL and UML modeling tools which is listed in the following:①Combining UML with OCL in the initial of modeling, and using the validated syntax OCL constraints defined in the operations of class diagram for the guard condition of state diagram, we propose RSC (Restricted State Chart)– state diagram model with OCL constraint, and the extract method of test sequence with OCL constraint from it. It can reduce the quantity of test sequence and test case by removing the constraint-conflict test sequence, thus the cost of software testing decreases;②According to the problem of the case only partly containing test case input, the article gives the generation method of expected output in test case by post-constraints. Thus, the test case is completed;③Design and implement a framework for software testing based on UML/OCL, provided the main structure of it, and focus on the key technologies involved in the design and implementation process of various functional modules;④By deeply researching on the file structure of UML model file(ZARGO) generated by ArgoUML modeling tool, we remove data that are inconsistent in XML format and system requirements, and use DOM API to extract useful model information from class diagram and state diagram to supply available information for the test case generation;⑤In the end, we establish an experimental model, come up with a successful resolution to the UML model, following on, realize the construction algorithm of the adjacency table derived from RSC and the generation algorithm of test sequence with OCL constraints based on the extracted information on .NET framework. Not only it provides an effective means for automatic generation of test sequence based on UML/OCL framework, but also establishes the basis of test case's automatic generation. The results of the experiment proved the correctness and effectiveness of the ideas on UML / OCL test case generation in the thesis.
Keywords/Search Tags:UML, OCL, State Diagram, Test Sequence, Test Case
PDF Full Text Request
Related items