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

计算机工程 ›› 2011, Vol. 37 ›› Issue (9): 25-28. doi: 10.3969/j.issn.1000-3428.2011.09.009

• 博士论文 • 上一篇    下一篇

一种路径测试数据自动生成方法

曹 洋,胡春华,陈少波,李路明   

  1. (清华大学航天航空学院人机与环境工程研究所,北京 100084)
  • 出版日期:2011-05-05 发布日期:2011-05-12
  • 作者简介:曹 洋(1982-),男,博士研究生,主研方向:软件测试自动化;胡春华,助理研究员;陈少波,博士研究生;李路明, 教授、博士生导师
  • 基金资助:
    国家科技支撑计划基金资助项目(2009BAI79B03);国家自然科学基金资助项目(60906050/F040604);航天医学基础与应用国家重点实验室开放基金资助项目(SMFA09K08)

Data Automatic Generation Approach for Path Test

CAO Yang, HU Chun-hua, CHEN Shao-bo, LI Lu-ming   

  1. (Institute of Man-Machine & Environment Engineering, School of Aerospace, Tsinghua University, Beijing 100084, China)
  • Online:2011-05-05 Published:2011-05-12

摘要: 适应值函数的设计是决定测试数据生成质量和效率的关键,为此提出一种重叠路径结构,对程序路径进行描述,并设计基于遗传算法全路径比较的路径测试数据生成适应值函数。为测试数据生成算法定义生成时间期望的综合性能评价指标,以该指标与对照组算法进行比较实验。结果显示,该适应值函数能较好地平衡算法收敛性和消耗时间之间的矛盾。

关键词: 软件测试, 路径测试, 测试数据生成, 遗传算法, 适应值函数

Abstract: A structure of overlapped paths is proposed to extract the information of control flow and describe paths of a program. Two fitness functions are constructed to generate test data for path test based on genetic algorithms with whole path’s comparison. An indicator is defined to evaluate the synthesis performance of different fitness functions, and several other methods are selected for comparison with experiment. Results show that the two fitness functions balance the convergence and time consumption well.

Key words: software test, path test, test data generation, genetic algorithm, fitness function

中图分类号: