Font Size: a A A

Research On Methods For Generating Test Cases Of Inter-classes Interaction Based On UML Models And OCL Constraints

Posted on:2013-02-06Degree:MasterType:Thesis
Country:ChinaCandidate:Q Y FengFull Text:PDF
GTID:2218330371976212Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Normally,the task of model-based software testing is to do some work as follows:firstly,design a formal model which is read and identified by computer according to software system under test(short for as SUT);secondly,the difference between model-based software testing and other formal methods is that model-based software testing focuses on generating a set of test cases from models, not committed to keep the software system under test and the specifications consistent in all possible circumstances.Model-based software testing use test cases to test the software system under test to get sufficient evidence that the behavior of the system under test is consistent with the model expectations.Actually,software testing based on UML models is to generate effective and complete test cases by selecting the most appropriate description of the software specification.Recent years,with the expansive use of object-oriented programming in computer field,visual software testing technology based on object-oriented models has become the focus of current research, and obtained a lot of technology achievements.Aiming at the characteristics of the interaction between classes of object-oriented software systems,the paper proposes a middle model called EG and its generation, generate effective and complete test cases.There are some features in Object-Oriented Software, such as classes, encapsulation,inheritance,dynamic connections,which make the Object-Oriented testing procedures division and the choice of strategy is different from traditional testing ideas. Based on the characteristics of Object-Oriented software,the paper adopts sequence diagram of UML design model which is constrainted by OCL for testing interaction among classes. The paper mainly proposes Transform_SDToEG algorithm. A sequence diagram SD will be converted to a graph called EG,short for Execution Graph. In this algorithm,the new features alt,loop,opt,break four major combined fragments in UML2.0sequence diagram and nesting among them,the polymorphism problem will be solved; In order to get the smallest complete test pathes;EG traversal strategy and puts up with Generate_TestCase algorithm. It determines test scenarios by testing paths,then,removes invalid scenarios by OCL constraints,and finally generates test cases. Case analysis and experimental validation show that our solution can do software testing be based on UML sequence diagram and OCL.EG structre generated by our method is simple and contains rich content,otherwise redundant paths and invalid test scenarios are removed,through this,we can get effective test cases.
Keywords/Search Tags:UML sequence diagram, OCL execution graph(EG), test scenario, test case
PDF Full Text Request
Related items