作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2012, Vol. 38 ›› Issue (10): 34-37. doi: 10.3969/j.issn.1000-3428.2012.10.009

• 软件技术与数据库 • 上一篇    下一篇

带OCL的活动图多态性测试用例生成方法

曾 一,丁 娜,邹 明   

  1. (重庆大学计算机学院,重庆 400030)
  • 收稿日期:2011-08-22 出版日期:2012-05-20 发布日期:2012-05-20
  • 作者简介:曾 一(1961-),男,教授,主研方向:软件工程,软件测试;丁 娜,硕士研究生;邹 明,硕士
  • 基金资助:
    国家自然科学基金资助项目(61004112)

Activity Diagram Polymorphism Test Case Generation Method with OCL

ZENG Yi, DING Na, ZOU Ming   

  1. (College of Computer Science, Chongqing University, Chongqing 400030, China)
  • Received:2011-08-22 Online:2012-05-20 Published:2012-05-20

摘要: 研究UML活动图多态性测试用例的生成方法。形式化定义活动图,结合由类图、OCL约束和Liskov替换原则确定的多态性方法类集,扩展活动图中含多态信息的节点,得到多态扩展活动图。利用测试路径构造方法和覆盖准则,对多态扩展活动图进行遍历,生成测试用例。实验结果表明,该方法能生成含多态性信息的测试用例,提高测试覆盖度。

关键词: 统一建模语言, 对象约束语言, 扩展活动图, 多态性方法集, 测试用例

Abstract: This paper researches the method for generating Unified Modeling Language(UML) activity diagram polymorphism test cases. It formally defines the activity diagram, and combines the Class Sets of Polymorphism Methods(CSPM) based on class diagram, Object Constraints Language(OCL) and Liskov replacement rules. It extends the nodes with polymorphic information in activity diagram, obtains the extended polymorphic activity diagram. Test cases are generated by traversing the obtained activity diagram which uses the proposed test path constructing method and coverage criterion. Experimental result shows that method can generate test cases with polymorphic information and improve the test coverage degree.

Key words: Unified Modeling Language(UML), Object Constraint Language(OCL), extended activity diagram, Class Set of Polymorphism Method (CSPM), test case

中图分类号: