Optimized Test Case Generation for Basis Path Testing using Improved Fitness Function with PSO

Updesh Kumar Jaiswal, Amarjeet Prajapati · 2021

The generation of an optimal number of test cases for the Basis path testing is a crucial and challenging optimization problem in the field of software testing. In the literature, a variety of Basis path testing approaches have been proposed. Recently, the search-based optimization approaches for the Basis path testing have been found more effective compared to the traditional analytical based approaches of Basis path testing. Even the existing search-based Basis path testing approaches can generate effective test cases covering most of the paths, still, there are many paths are remained uncovered. In this work, we propose a Particle Swarm Optimization (PSO) based test case selection approach for the Basis path testing. In this contribution, we introduce an improved fitness function namely Improved Fitness Function (IFF) that can guide the PSO based optimization process towards selection of best test case. For this, we use a High Probability of Coverage (HPC) path to define the IFF. To demonstrate our proposed approach, we conducted a detailed case study over the Largest among Three Numbers (LTN) program. The results of our case study show that the proposed approach can produce more better results in terms of all linearly independent paths coverage of Control Flow Graph (CFG).

Read the paper · More papers on PaperTik