PSO based test case generation for critical path using improved combined fitness function

Abstract Test case generation is a multi objective problem as the goal is to achieve multiple targets. In existing work, emphasis is given to generate test cases to achieve maximum path coverage. For quality testing, coverage of critical path is more important than percentage of code coverage. The objective of this paper is to generate test cases to achieve maximum path coverage with a challenge of covering a critical path, within the available test resources. At the time of automatic test case generation, a path is critical if the probability of covering the path is low. Search based techniques use metaheuristic algorithms for automated test case generator. Fitness function plays an important role in searching techniques. We propose a fitness function, Improved Combined Fitness (ICF) function, using Adaptive Particle Swarm Optimization (APSO), to generate test cases automatically based on path coverage criteria. We have conducted experiments on three well-known case studies and observed that though both Particle Swarm Optimization (PSO) and APSO with the existing fitness functions, branch distance function and branch distance combined with approximation level, give maximum path coverage, sometimes fail to achieve critical path. Our proposed ICF function applied on APSO gives better result in terms of number of path coverage.

[1]  Paolo Tonella,et al.  Automated Test Case Generation as a Many-Objective Optimisation Problem with Dynamic Selection of the Targets , 2018, IEEE Transactions on Software Engineering.

[2]  Joachim Wegener,et al.  Evolutionary test environment for automatic structural testing , 2001, Inf. Softw. Technol..

[3]  Mohammad Alshraideh,et al.  Search‐based software test data generation for string data using program‐specific search operators , 2006, Softw. Test. Verification Reliab..

[4]  Rakesh Roshan,et al.  Review of Search based Techniques in Software Testing , 2012 .

[5]  A. Dias-Neto,et al.  0006/2011 - Threats to Validity in Search-based Software Engineering Empirical Studies , 2011 .

[6]  Mitrabinda Ray,et al.  Metaheuristic Techniques for Test Case Generation: A Review , 2018, J. Inf. Technol. Res..

[7]  Tsong Yueh Chen,et al.  Case studies on the selection of useful relations in metamorphic testing , 2004 .

[8]  Xiong Xu,et al.  Improved evolutionary generation of test data for multiple paths in search-based software testing , 2017, 2017 IEEE Congress on Evolutionary Computation (CEC).

[9]  Gordon Fraser,et al.  On the Effectiveness of Whole Test Suite Generation , 2014, SSBSE.

[10]  Shujuan Jiang,et al.  Evolutionary approach to generating test data for data flow test , 2018, IET Softw..

[11]  Ina Papadhopulli,et al.  A Fitness Function for Search-based Testing of Java Classes, which is Based on the States Reached by the Object under Test , 2016 .

[12]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

[13]  Mohammad Alshraideh,et al.  Search-based software test data generation for string data using program-specific search operators: Research Articles , 2006 .

[14]  Yoichi Hayashi,et al.  Neural expert system using fuzzy teaching input and its application to medical diagnosis , 1994 .

[15]  John D. Musa,et al.  Operational profiles in software-reliability engineering , 1993, IEEE Software.

[16]  Zhifeng Hao,et al.  Search-Based Algorithm With Scatter Search Strategy for Automated Test Case Generation of NLP Toolkit , 2021, IEEE Transactions on Emerging Topics in Computational Intelligence.

[17]  André Baresel,et al.  Fitness Function Design To Improve Evolutionary Structural Testing , 2002, GECCO.

[18]  Xu Liang,et al.  Software test cases generation based on improved particle swarm optimization , 2014, Proceedings of 2nd International Conference on Information Technology and Electronic Commerce.

[19]  Song Huang,et al.  Test cases generation for multiple paths based on PSO algorithm with metamorphic relations , 2018, IET Softw..

[20]  Yong Chen,et al.  Comparison of Two Fitness Functions for GA-Based Path-Oriented Test Data Generation , 2009, 2009 Fifth International Conference on Natural Computation.

[21]  P. Maragathavalli Search-based software test data generation using evolutionary computation , 2011, ArXiv.