| 注册
首页|期刊导航|电子学报|基于UML模型和OCL约束的类间交互测试用例生成方法研究

基于UML模型和OCL约束的类间交互测试用例生成方法研究

柴玉梅 冯秋燕 王黎明

电子学报Issue(6):1242-1248,7.
电子学报Issue(6):1242-1248,7.DOI:10.3969/j.issn.0372-2112.2013.06.032

基于UML模型和OCL约束的类间交互测试用例生成方法研究

Research on Methods for Generating Test Cases of Inter-Classes Interaction Based on UML Models and OCL Constraints

柴玉梅 1冯秋燕 2王黎明1

作者信息

  • 1. 郑州大学信息工程学院,河南郑州 450001
  • 2. 河南财经政法大学,河南郑州 450000
  • 折叠

摘要

Abstract

There are some features in object-oriented software ,such as classes ,encapsulation ,inheritance ,and dynamic con-nections .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 al-gorithm 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 .

关键词

UML/顺序图/OCL/执行图 (EG )/测试场景/测试用例

Key words

UML (United Model Language )/sequence diagram/OCL (Object Constraints Language )/execution graph (EG )/test scenario/test case

分类

信息技术与安全科学

引用本文复制引用

柴玉梅,冯秋燕,王黎明..基于UML模型和OCL约束的类间交互测试用例生成方法研究[J].电子学报,2013,(6):1242-1248,7.

电子学报

OA北大核心CSCDCSTPCD

0372-2112

访问量0
|
下载量0
段落导航相关论文