计算机应用 ›› 2014, Vol. 34 ›› Issue (1): 270-275.DOI: 10.11772/j.issn.1001-9081.2014.01.0270

• 计算机软件技术 • 上一篇    下一篇

基于UML交互概览图的测试线索的生成方法

曾一1,2,王翠钦2,李函逾2,洪豪2   

  1. 1. 软件理论与技术重庆市重点实验室,重庆 400030
    2. 重庆大学 计算机学院,重庆 400030;
  • 收稿日期:2013-06-08 修回日期:2013-08-21 出版日期:2014-01-01 发布日期:2014-02-14
  • 通讯作者: 王翠钦
  • 作者简介:曾一 (1961-),男,山西大同人,教授, CCF会员,主要研究方向:软件工程、软件度量、软件测试、软件模型、软件工具、面向服务计算;王翠钦(1988-),女,河北沧州人,硕士研究生,主要研究方向:软件测试;李函逾(1990-),男,云南保山人,硕士研究生,主要研究方向:软件测试;洪豪(1988-),男,湖北崇阳人,硕士研究生,主要研究方向:面向服务计算。

Test clue generation based on UML interaction overview diagram

ZENG Yi1,2,WANG Cuiqin2,LI Hanyu2,HONG Hao2   

  1. 1. Chongqing Key Laboratory of Software Theory and Technology, Chongqing 400030, China
    2. College of Computer Science, Chongqing University, Chongqing 400030, China;
  • Received:2013-06-08 Revised:2013-08-21 Online:2014-01-01 Published:2014-02-14
  • Contact: WANG Cuiqin

摘要: 针对单一UML模型测试不充分的问题,结合UML2.0交互概览图的特点开展测试方法研究,提出一种测试线索自动生成的方法。首先,给出UML类图、顺序图、交互概览图(OID)的形式化定义;通过提取交互概览图的流程信息和对象交互信息分别构造节点控制流图(NCFG)和消息序列图(MSD);将从MSD提取的消息路径嵌入到NCFG中,构造可测试交互概览图模型;最后采用两两覆盖准则生成测试线索。实验验证了该方法自动生成的测试线索在保证测试充分性的前提下可避免组合爆炸。

关键词: UML模型, 交互概览图, 流程信息, 覆盖准则, 测试线索

Abstract: Concerning the problem that single UML model can not test the software sufficiently, this paper proposed a new method of automatically generating software test clues by combining the characteristics of UML2.0 interaction overview diagram. First, this paper gave the formal definition of UML class diagrams, sequence diagrams and Interaction Overview Diagrams (IOD) . Second, the Node Control Flow Graph (NCFG) was constructed by extracting the process information of the interaction overview diagram while the Message Sequence Diagrams (MSD) were constructed by extracting the object interaction information. The testable model of IOD was constructed by embedding the MSD's message path into NCFG. At last, the paper adopted two-two coverage criterion to generate test clues. The experiment verifies that this method which automatically generates test clues avoids the combinatorial explosion while guaranteeing the test adequacy.

Key words: UML model, Interaction Overview Diagram (IOD), process information, coverage criterion, test clue

中图分类号: