Int J Performability Eng ›› 2025, Vol. 21 ›› Issue (1): 1-9.doi: 10.23940/ijpe.25.01.p1.19

• Original article •     Next Articles

An Effective PSO-Driven Method for Test Data Generation in Branch Coverage Software Testing

Updesh Kumar Jaiswala,b,*() and Amarjeet Prajapatib   

  1. a Department of CSE, Ajay Kumar Garg Engineering College, Ghaziabad, India
    b Department of CSE and IT, Jaypee Institute of Information Technology, Noida, India
  • Submitted on ; Revised on ; Accepted on
  • Contact: Updesh Kumar Jaiswal E-mail:19403035@mail.jiit.ac.in

Abstract:

The enhancement of software system reliability and quality through software testing is a crucial aspect of the software development lifecycle. However, traditional software testing methods often entail significant investments in time, labor, and cost. In recent times, search-based test data generation has emerged as an operational methodology for achieving this efficiency. Various approaches have been developed to generate test cases for branch coverage using meta-heuristic algorithms. Despite their effectiveness, there exists room for improvement in existing methodologies. In this research, we propose a novel search-based test data generation method for branch coverage software testing, leveraging the capabilities of Particle Swarm Optimization (PSO). To validate our approach, we conducted experiments on seven well-known software programs. Our results demonstrate that the proposed PSO-based method outperforms existing test data generation methods such as Simulated Annealing (SA), Genetic Algorithm (GA), Harmony Search (HS), Ant Colony Optimization (ACO), and Artificial Bee Colony (ABC). Specifically, our method consistently produces superior test data in significantly fewer iterations, effectively covering a greater number of branches. This research contributes to the ongoing efforts in optimizing software testing processes, emphasizing the potential of PSO in enhancing the efficiency of automated test data generation for branch coverage.

Key words: branch distance, branch weight, fitness function, particle swarm optimization, structural testing, test case