欢迎来到天天文库
浏览记录
ID:53761880
大小:504.15 KB
页数:7页
时间:2020-04-24
《基于UML模型和OCL约束的类间交互测试用例生成方法研究-论文.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、第6期电子学报Vo1.41No.62013年6月AI:TAELECrRONICAs1NICAJun.2013基于UML模型和OCL约束的类间交互测试用例生成方法研究柴玉梅,冯秋燕,王黎明(1.郑州大学信息工程学院,河南郑州450001;2.河南财经政法大学,河南郑州450000)摘要:面向对象所具有的类、封装、继承、动态连接等特性,使得面向对象测试步骤的划分以及测试策略的选择有别于传统的测试思想.本文针对面向对象软件的特点,采用基于模型的软件测试方法,对UML(UnitedModelLan—guage)设计模型中的顺序图添加OCL(ObjectC
2、onstraintsLanguage)约束,做类间交互的软件测试.本文提出执行图EG生成算法,将顺序图SD转换为执行图EG,解决UML2.oN序图新增特性中的alt、loop、opt、break四种常见组合片段及其嵌套和多态性问题;为得到最小完备的测试路径,本文提出了EG的遍历策略和测试路径生成算法;最后,根据测试路径确定测试场景,并删除无效场景,生成测试用例.经实验验证,此方法可以基于UML顺序图与OCL约束进行系统地测试.关键词:UML;顺序图;OCL;执行图(EG);测试场景;测试用例中图分类号:TP311.5文献标识码:A文章编号:037
3、2—2112(2013)06-1242.07电子学报URL.http://www.ejourna1.org.cnDOI:10.3969/j.issn.0372—2112.2013.06.032ResearchonMethodsforGeneratingTestCasesofInter-ClassesInteractionBasedonUMLModelsandOCLConstraintsCHAIYu.mei,FENGQiu.yan2,WANGLi.ming(1.SchoolofInformationgng,ZhengzhouUniversity,呐
4、“,Henan450001,China;2.HenanUniversityofEconomicsandLaws,Zhengzhou,Henan450000,Ch/na)Abstract:ThereaIesomefeaturesinobject-orientedsoftware,suchasclasses,encapsulation,inheritance,anddynamiccon—nections.Theymakethedivisionofobject-orientedtestingproceduresandthechoiceofstrateg
5、ydif~entfromtraditionaltestingideas.Accordingtothecharacteristicsofobject-orientedsoftware.thepaperadoptsthemethodsbasedonmodelsfortestingsoftwareandaddsOCL(ObjectConstraintsLanguage)constraintsforsequencediagramofUML(UnitedModelLanguage)designmodelandtestsinteractionamongcla
6、sses.ThepaperproposesthealgorithmforgeneratingEG(ExecutionGraph)andtransformsSD(SequenceDiagram)toEG,andSDiscons~aintedbyOCLfortestinginteractionamongclasses.Inthisalgorithm,thetestingproblemforfourmajorcombinedfragmentsincludingalt,loop,opt,breakinthenewfeatures,andtheirnest
7、ingamongthemandthepolymorphism,willbesolvedinsequencediagramofUML2.0.Inordertogetthesmallestcompletetestpathes.strategyfortraversingEGandal—gorithmforgeneratingtestpathsarepresented.Finally,thepaperproposesalgorithmfordeterminingtestscenariosbytestingpathes,deletinginvalidsce
8、nariosbyOCLconstraints,andgeneratingtestcases.Experimentalvalidation
此文档下载收益归作者所有