计算机工程与应用 ›› 2010, Vol. 46 ›› Issue (15): 53-56.DOI: 10.3778/j.issn.1002-8331.2010.15.017

• 研发、设计、测试 • 上一篇    下一篇

面向路径的测试数据自动生成工具的设计

陈继锋1,刘树锟1,王志海2

  

  1. 1.湖南涉外经济学院 计算机科学与技术学部,长沙 410205
    2.上海无距科技有限公司,上海 200049
  • 收稿日期:2010-01-22 修回日期:2010-03-22 出版日期:2010-05-21 发布日期:2010-05-21
  • 通讯作者: 陈继锋

Design of automatic test data generator based on program path

CHEN Ji-feng1,LIU Shu-kun1,WANG Zhi-hai2   

  1. 1.Department of Computer,Hunan International Economics University,Changsha 410205,China
    2.Shanghai WooJoy Technology Co.,Ltd,Shanghai 200049,China
  • Received:2010-01-22 Revised:2010-03-22 Online:2010-05-21 Published:2010-05-21
  • Contact: CHEN Ji-feng

摘要: 设计了一个通用的基于控制流和数据流的结构测试数据自动生成的工具。该工具根据控制流和数据流测试中所采用的覆盖标准来选取测试路径,并以改进后的迭代松弛法为核心,对所选取的路径生成测试数据。同时工具采用Fibonacci法优化选取路径,对不可达路径进行处理,并对测试数据的分支覆盖率、DCP覆盖率等进行了统计。实验结果表明该工具是可行的。

关键词: 路径, 测试数据自动生成, 覆盖率

Abstract: A path-based software tool on automatic test data generation is designed in this paper.The coverage criteria for control flow and data flow are used to optimize the selection of test path.Using improved iterative relaxation method,the tool on path-based automatic test data generation is used to generate test data for the selected path.The infeasible path is processed with Fibonacci method.The rate of branch coverage and DCP coverage on test data are obtained through the tool.Test results show that the tool is feasible.

Key words: path, automatic test data generation, coverage rate

中图分类号: