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

计算机工程 ›› 2011, Vol. 37 ›› Issue (2): 25-26. doi: 10.3969/j.issn.1000-3428.2011.02.009

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

基于状态图的测试路径自动生成

李 鹏1,彭祥伟1,周 喜1,董 军1,代四广2   

  1. (1. 中国科学院新疆理化技术研究所,乌鲁木齐 830011;2. 武汉理工大学华夏学院,武汉 430223)
  • 出版日期:2011-01-20 发布日期:2011-01-25
  • 作者简介:李 鹏(1981-),男,硕士研究生,主研方向:软件测试;彭祥伟,硕士研究生;周 喜,副教授;董 军,助理研究员;代四广,助教
  • 基金资助:
    新疆维吾尔自治区重大专项基金资助项目(200732143-1)

Automated Test Path Generation Based on State Diagram

LI Peng1, PENG Xiang-wei 1, ZHOU Xi1, DONG Jun1, DAI Si-guang2   

  1. (1. Xinjiang Technical Institute of Physics & Chemistry, Chinese Academy of Sciences, Urumqi 830011, China;2. Huaxia College, Wuhan University of Technology, Wuhan 430223, China)
  • Online:2011-01-20 Published:2011-01-25

摘要: 提出一种基于状态图的测试路径自动生成算法,该算法从状态图的初始状态到终止状态进行遍历,可以得到一组路径,由该组路径生成的测试用例集可满足状态图的转移覆盖测试准则。根据循环复杂度,对路径集的总长度进行优化,从而减少测试用例数量。实验结果表明,该算法有效可行,在实际应用中能够取得良好的效果。

关键词: 状态图, 测试准则, 转移路径

Abstract: This paper presents an algorithm, which travels the state diagram from the initial state to the ending state and finds all the transition paths. Test cases generation is based on test paths, which satisfies transition test criterion. It can optimize the length of the path, consequently reducing the number of test case based on cycle complexity. Experimental results indicate this algorithm is effective and feasible, and good effects are obtained in practical applications.

Key words: state diagram, test criterion, transition path

中图分类号: