TY - GEN
T1 - Automatic and Efficient Test Case Generation with High-diversity and Global-search Particle Swarm Optimization
AU - Zhao, Yuchen
AU - Yuan, Haitao
AU - Li, Jingyao
AU - Zheng, Ziyue
AU - Bi, Jing
AU - Zhang, Jia
AU - Zhou, Meng Chu
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025
Y1 - 2025
N2 - Recent years have witnessed the wide application of computer software in automation and intelligent production, and the demand for generating high-diversity software test cases is increasing. At present, the main software test case generation methods adopt the Monte Carlo method or use expert knowledge, which requires high computing power and time cost. How to efficiently generate test cases with high statement coverage has become a challenging engineering problem. In this work, the statement coverage is used to evaluate the contribution of test cases, and a single objective optimization problem with parameter constraints is proposed. To realize it, an optimization algorithm combining particle swarm optimization (PSO), genetic algorithm (GA), and simulated annealing (SA) is used to generate test cases with high statement coverage. In the optimization framework, each particle represents a candidate test case, encoded as a vector of input parameters corresponding to the code under testing. These position vectors are directly mapped to executable test inputs, and the fitness of each particle is evaluated by the statement coverage achieved upon execution. The test cases generated using the proposed hybrid algorithm achieve a statement coverage of up to 98%. It has been successfully applied to several core components in industrial software to demonstrate its strong generalization.
AB - Recent years have witnessed the wide application of computer software in automation and intelligent production, and the demand for generating high-diversity software test cases is increasing. At present, the main software test case generation methods adopt the Monte Carlo method or use expert knowledge, which requires high computing power and time cost. How to efficiently generate test cases with high statement coverage has become a challenging engineering problem. In this work, the statement coverage is used to evaluate the contribution of test cases, and a single objective optimization problem with parameter constraints is proposed. To realize it, an optimization algorithm combining particle swarm optimization (PSO), genetic algorithm (GA), and simulated annealing (SA) is used to generate test cases with high statement coverage. In the optimization framework, each particle represents a candidate test case, encoded as a vector of input parameters corresponding to the code under testing. These position vectors are directly mapped to executable test inputs, and the fitness of each particle is evaluated by the statement coverage achieved upon execution. The test cases generated using the proposed hybrid algorithm achieve a statement coverage of up to 98%. It has been successfully applied to several core components in industrial software to demonstrate its strong generalization.
KW - genetic algorithm
KW - particle swarm optimization
KW - simulated annealing
KW - Software testing
KW - Test case generation
UR - https://www.scopus.com/pages/publications/105034834105
U2 - 10.1109/ICNSC66229.2025.00083
DO - 10.1109/ICNSC66229.2025.00083
M3 - 会议稿件
AN - SCOPUS:105034834105
T3 - Proceedings - 2025 International Conference on Networking, Sensing and Control, ICNSC 2025
SP - 471
EP - 476
BT - Proceedings - 2025 International Conference on Networking, Sensing and Control, ICNSC 2025
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 2025 International Conference on Networking, Sensing and Control, ICNSC 2025
Y2 - 1 October 2025 through 3 October 2025
ER -