Computer Engineering and Applications ›› 2012, Vol. 48 ›› Issue (22): 79-83.

Previous Articles     Next Articles

Fitness function design approach for test data generation of multiple path coverage

YI Dandan, JIANG Shujuan, ZHANG Yanmei   

  1. School of Computer Science and Technology, China University of Mining and Technology, Xuzhou, Jiangsu 221116, China
  • Online:2012-08-01 Published:2012-08-06

多路径覆盖测试数据生成适应度函数设计方法

伊丹丹,姜淑娟,张艳梅   

  1. 中国矿业大学 计算机科学与技术学院,江苏 徐州 221116

Abstract: Considering the factors that affect the design of fitness function, this paper proposes an approach to design fitness function based on analytic hierarchy process. The method comes down the factors that affect the similarity of paths to three elements, and establishes a hierarchy analysis model. Then, establish the judging matrix for pairwise comparison of different factors, determine weights coefficient of each factors, and then construct fitness function. The approach is applied to test data generation for multi-path coverage based on genetic algorithm. The experiment results show that the proposed approach has a good advantage for generating test data for multiple paths compared with existing methods.

Key words: fitness function, analytic hierarchy process, genetic algorithm, multi-path coverage, test data generation

摘要: 综合考虑影响适应度函数设计的因素,提出一种基于层次分析法的适应度函数设计方法。该方法首先将影响路径之间相似度的因素归结为三要素,并建立层次分析模型。根据不同因素对路径间相似度的作用重要程度不同,建立因素之间两两比较的判断矩阵,确定每个因素的权重系数,进而构造适应度函数。最后,将该方法用于基于遗传算法的多路径覆盖的测试数据生成。实验结果表明,对于解决多路径覆盖的测试数据生成问题,与已有方法相比,该方法具有较好的优越性。

关键词: 适应度函数, 层次分析法, 遗传算法, 多路径覆盖, 测试数据生成