A Novel Strategy on Hybrid Particle Swarm Optimization to Automatic Test Case Generation for Data Flow Testing
Abstract
Software testing is an important measure for soft- ware quality assurance that aimed to identify all defects in software products. Particle Swarm Optimization (PSO) can be used to generate optimized test cases. However, test case generation using PSO suffers from premature convergence when solving some problems. This paper presents an algorithm named Hybrid Particle Swarm Optimization for Test Case Generation (HPSO-TCG) algorithm by employing crossover followed by mutation operator that satisfies def-use coverage criteria. We have proposed HPSO-TCG algorithm to generate optimized test cases using GA and PSO algorithms for Data Flow Testing. Our proposed algorithm takes instrumented version of program to be tested, def-use path list to be covered, crossover probability, mutation probability as input and gives optimized number of test cases with 100% coverage as output. Finally, we present the results that have been carried out to evaluate the performance and effectiveness of the proposed HPSO-TCG algorithm with new fitness function compared to the PSO algorithm.