Automatic test data generation for path testing using GAs

被引:75
作者
Lin, JC [1 ]
Yeh, PL [1 ]
机构
[1] Tatung Univ, Dept Comp Sci & Engn, Taipei 10451, Taiwan
关键词
software testing; path testing; genetic algorithms;
D O I
10.1016/S0020-0255(00)00093-1
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Genetic algorithms (GAs) are inspired by Darwin's the survival of the fittest theory. This paper discusses a genetic algorithm that can automatically generate test cases to test a selected path. This algorithm takes a selected path as a target and executes sequences of operators iteratively for test cases to evolve. The evolved test case will lead the program execution to achieve the target path. To determine which test cases should survive to produce the next generation of fitter test cases, a metric named normalized extended Hamming distance (NEHD, which is used to determine whether the final test case is found) is developed. Based on NEHD, a fitness function named SIMILARITY is defined to determine which test cases should survive if the final test case has not been found. Even when there are loops in the target path, SIMILARITY can help the algorithm to lead the execution to flow along the target path. (C) 2001 Elsevier Science Inc. All rights reserved.
引用
收藏
页码:47 / 64
页数:18
相关论文
共 21 条