International Journal of Performance Analysis in Sport, 2025, 21(1): 1-9 doi: 10.23940/ijpe.25.01.p1.19

Original article

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

Kumar Jaiswal Updesh,a,b,*, Prajapati Amarjeetb

Department of CSE, Ajay Kumar Garg Engineering College, Ghaziabad, India

Department of CSE and IT, Jaypee Institute of Information Technology, Noida, India

*Corresponding Author(s): Corresponding author. E-mail address: 19403035@mail.jiit.ac.in Corresponding author. E-mail address: 19403035@mail.jiit.ac.in

Revised:  Submitted on  Accepted: 

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.

Keywords: branch distance ; branch weight ; fitness function ; particle swarm optimization ; structural testing ; test case

PDF (428KB) Metadata Related articles Export EndNote| Ris| Bibtex

Cite this article

Kumar Jaiswal Updesh, Prajapati Amarjeet. An Effective PSO-Driven Method for Test Data Generation in Branch Coverage Software Testing. International Journal of Performance Analysis in Sport, 2025, 21(1): 1-9 doi:10.23940/ijpe.25.01.p1.19

Reference

Harman M., Jia Y., and Zhang Y., 2015. Achievements, open problems and challenges for search based software testing. In 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST), pp. 1-12.

Korel B., 1990.

Automated software test data generation

IEEE Transactions on Software Engineering, 16(8), pp. 870-879.

Maragathavalli P., 2011. Search-based software test data generation using evolutionary computation. Arxiv Preprint Arxiv:1103.0125.

Shahid M., Ibrahim S., and Mahrin M.N.R., 2011.

A study on test coverage in software testing

Advanced Informatics School (AIS), Universiti Teknologi Malaysia, International Campus, Jalan Semarak, Kuala Lumpur, Malaysia, 1.

Gursaran A., 2012.

Program test data generation branch coverage with genetic algorithm: comparative evaluation of a maximization and minimization approach

International Journal of Software Engineering and Applications, 3(1), pp. 207-218.

Chen Y., Zhong Y., Shi T., and Liu J., 2009. Comparison of two fitness functions for GA-based path-oriented test data generation. In 2009 Fifth International Conference on Natural Computation, 4, pp. 177-181.

Roshan R., Porwal R., and Sharma C.M., 2012.

Review of search based techniques in software testing

International Journal of Computer Applications, 51(6).

Thi D.N., Hieu V.D., and Ha N.V., 2016. A technique for generating test data using genetic algorithm. In 2016 International Conference on Advanced Computing and Applications (ACOMP), pp. 67-73.

Cohen M.B., Colbourn C.J., and Ling A.C., 2003. Augmenting simulated annealing to build interaction test suites. In 14th International Symposium on Software Reliability Engineering, 2003. ISSRE 2003., pp. 394-405.

Harman M., and McMinn P., 2009.

A theoretical and empirical study of search-based testing: local, global, and hybrid search

IEEE Transactions on Software Engineering, 36(2), pp. 226-247.

Mao C., 2014.

Harmony search-based test data generation for branch coverage in software structural testing

Neural Computing and Applications, 25, pp. 199-216.

Mao C., Yu X., Chen J., and Chen J., 2012. Generating test data for structural testing based on ant colony optimization. In 2012 12th International Conference on Quality Software, pp. 98-101.

Mao C., Xiao L., Yu X., and Chen J., 2015.

Adapting ant colony optimization to generate test data for software structural testing

Swarm and Evolutionary Computation, 20, pp. 23-36.

Aghdam Z.K., and Arasteh B., 2017.

An efficient method to generate test data for software structural testing using artificial bee colony optimization algorithm

International Journal of Software Engineering and Knowledge Engineering, 27(06), pp. 951-966.

Ahmed B.S., and Zamli K.Z., 2011.

A variable strength interaction test suites generation strategy using particle swarm optimization

Journal of Systems and Software, 84(12), pp. 2171-2185.

Habib A.S., Khan S.U.R., and Felix E.A., 2023.

A systematic review on search‐based test suite reduction: state‐of‐the‐art, taxonomy, and future directions

IET Software, 17(2), pp. 93-136.

Garg D., and Garg P., 2015.

Basis path testing using SGA & HGA with ExLB fitness function

Procedia Computer Science, 70, pp. 593-602.

Jiang S., Chen J., Zhang Y., Qian J., Wang R., and Xue M., 2018.

Evolutionary approach to generating test data for data flow test

IET Software, 12(4), pp. 318-323.

Jaiswal U., and Prajapati A., 2021. Optimized test case generation for basis path testing using improved fitness function with PSO. In Proceedings of the 2021 Thirteenth International Conference on Contemporary Computing, pp. 475-483.

Wang J., Huang Y., Chen C., Liu Z., Wang S., and Wang Q., 2024.

Software testing with large language models: survey, landscape, and vision

IEEE Transactions on Software Engineering.

Bajaj A., Abraham A., Ratnoo S., and Gabralla L.A., 2022.

Test case prioritization, selection, and reduction using improved quantum-behaved particle swarm optimization

Sensors, 22(12), 4374.

Haas R., Nömmer R., Juergens E., and Apel S., 2024.

Optimization of automated and manual software tests in industrial practice: A survey and historical analysis

IEEE Transactions on Software Engineering.

Manojkumar V., and Mahalakshmi R., 2024. Test case optimization technique for web applications. In 2024 Third International Conference on Distributed Computing and Electrical Circuits and Electronics (ICDCECE), pp. 1-7.

Tracey N., Clark J., Mander K., and McDermid J., 1998. An automated framework for structural test-data generation. In Proceedings 13th IEEE International Conference on Automated Software Engineering (Cat. No. 98EX239), pp. 285-288.

Pargas R.P., Harrold M.J., and Peck R.R., 1999.

Test‐data generation using genetic algorithms

Software Testing, Verification and Reliability, 9(4), pp. 263-282.

Minohara T., and Tohma Y., 1995. Parameter estimation of hyper-geometric distribution software reliability growth model by genetic algorithms. In Proceedings of Sixth International Symposium on Software Reliability Engineering. ISSRE'95, pp. 324-329.

Lin J.C., and Yeh P.L., 2001.

Automatic test data generation for path testing using GAs.

Information Sciences, 131(1-4), pp. 47-64.

Kaur A., and Bhatt D., 2011.

Hybrid particle swarm optimization for regression testing

International Journal on Computer Science and Engineering, 3(5), pp. 1815-1824.

Mao C., 2014.

Generating test data for software structural testing based on particle swarm optimization

Arabian Journal for Science and Engineering, 39, pp. 4593-4607.

Rath D., Parida S., Mishra D.B., and Pradhan S., 2022.

Evolutionary algorithms for path coverage test data generation and optimization: A review

Optimization of Automated Software Testing Using Meta-Heuristic Techniques, pp. 91-103.

/