An approach for test data generation using program slicing and particle swarm optimization

作者:Jiang, Shujuan*; Yi, Dandan; Ju, Xiaolin; Wang, Lingsai; Liu, Yingqi
来源:Neural Computing & Applications, 2014, 25(7-8): 2047-2055.
DOI:10.1007/s00521-014-1692-z

摘要

Heuristic search-based test data generation has a potential higher efficiency in software testing with path covering. However, these approaches are suffered in covering the long and complex path. In this paper, we propose a method for generating test data based on program slicing and particle swarm optimization. With the interest points selected from a target path, we perform a program slicing to remove the statements which are irrelevant to the interest points. Our method simplifies the target path and the actual path to get a better fitness value. After program slices obtained, the population is evolved using particle swarm optimization to improve the efficiency of test data generation.