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

计算机工程 ›› 2010, Vol. 36 ›› Issue (22): 58-60. doi: 10.3969/j.issn.1000-3428.2010.22.020

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

基于UML顺序图的测试用例生成

李志强,邵培南,朱 辉   

  1. (华东计算技术研究所,上海 200233)
  • 出版日期:2010-11-20 发布日期:2010-11-18
  • 作者简介:李志强(1983-),男,硕士研究生,主研方向:软件工程,软件测试;邵培南,研究员;朱 辉,硕士研究生

Test Cases Generation Based on UML Sequence Diagram

LI Zhi-qiang, SHAO Pei-nan, ZHU Hui   

  1. (East-China Institute of Computer Technology, Shanghai 200233, China)
  • Online:2010-11-20 Published:2010-11-18

摘要:

为生成覆盖测试需求的测试用例集,提出一种基于UML顺序图自动生成测试用例的方法。通过分析待测系统的功能用例,对其进行顺序图建模。在基于该顺序图生成测试用例的过程中,对顺序图添加规约条件,解析顺序图,得到场景测试树,再遍历该树,得到场景的输入、预期输出、约束条件以及场景环境,这4部分组成了测试用例,同时对如何处理复杂的顺序图及如何满足测试用例充分性等问题进行分析总结,提出有效的解决策略。

关键词: UML顺序图, 软件测试, 测试用例生成

Abstract:

In order to generate test cases set that satisfies the requirements of test, a method about generating test cases from UML sequence diagrams is put forward. By analyzing the functions use cases of system to be tested, a sequence diagram is modeled. The process of test cases generation based on this sequence diagram comes. Some constraint is added to the diagram. A scenario tree can be created by parsing it. The input, respected output, constraint and scenario context are generated through a traversing of the scenario tree, and these four also constitute the test case. The paper analyzes and summarizes the problems that how to deal with complex sequence diagrams and satisfy the sufficiency of test cases, and also brings the corresponding effective solutions.

Key words: UML sequence diagram, software test, test cases generation

中图分类号: