Font Size: a A A

Research On UML And Class State Testing Technology

Posted on:2011-08-12Degree:MasterType:Thesis
Country:ChinaCandidate:L C JiangFull Text:PDF
GTID:2178360308469499Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The class state testing is a test technology based on state machine model. Class state machine is generally used to describe the state transition when objects respond to various events. During the testing execution, the state transferring graphs will be traversed in order to generate class state testing sequences according to the given coverage criteria, and check whether the testing sequences drivered by every available test data have made the objects transit into the expected state baesed on the software specification in this phase. As a model derived from the Finite State Machine (FSM), UML state diagram can clearly describe the class state transition.As the content of UML state diagram document has level layout features, this paper uses OOP design a UML state diagram file parsing plan based on regular expression and discuss the technology of class state testing sequences generation that meet the state coverage and transition coverage criterion.In order to avoid omitting data errors in state testing, this thesis adopts data flow analysis technology which has been widely accepted as a practicable way to analyze the generated class state testing sequences. In this way, the exception of the data flow will be found out and revised.Since the test data selection depends on the state transferring pre-conditions, class state testing sequences generate rely on the execution of test data drives. After analyzing the characteristics of class state testing sequences generated based on the UML state diagram and relationships between testing sequences and test data, this thesis propose a new technology which applies AOP source codes injection technology to trace the value of test variants instead of the existing original source plug-in-and-install technology.During the state testing execution, it is necessary to not only induce some codes to trace state transition so as to conduct the feasibility detection analysis, but also to break the restriction of the class capsulation and check the class states by re-write classes codes. It will lead to testing scripts are redundant, strong-coupling and inconsistent. To solve these problems above, this thesis proposed a new class state testing execution method based on AOP which can solve those problems effectively by separating the concerns and breaking through the restriction of class capsulation.This thesis presents a class state testing model based on the ideas above, and a prototype system for class state testing is designed to prove the efficiency of the model. The prototype system is developed on the MyEclipse6.0 platform with JAVA language. It takes the Rational Rose model files as input and output testing sequences of tested classes. It can trace the testing variants to guide the test data selection in test data generation. It can also detect the transitions feasibility and verify the final states of classes in the testing execution. Case studies show that the presented prototype system can achieve the expected effects.
Keywords/Search Tags:software testing, class state testing, UML parsing, test data, test execution, AOP
PDF Full Text Request
Related items