Skip to main navigation Skip to search Skip to main content

Automatic and Efficient Test Case Generation with High-diversity and Global-search Particle Swarm Optimization

  • Yuchen Zhao
  • , Haitao Yuan
  • , Jingyao Li
  • , Ziyue Zheng
  • , Jing Bi
  • , Jia Zhang
  • , Meng Chu Zhou

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution

Abstract

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.

Original languageEnglish (US)
Title of host publicationProceedings - 2025 International Conference on Networking, Sensing and Control, ICNSC 2025
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages471-476
Number of pages6
ISBN (Electronic)9798331597498
DOIs
StatePublished - 2025
Event2025 International Conference on Networking, Sensing and Control, ICNSC 2025 - Oulu, Finland
Duration: Oct 1 2025 → Oct 3 2025

Publication series

NameProceedings - 2025 International Conference on Networking, Sensing and Control, ICNSC 2025

Conference

Conference2025 International Conference on Networking, Sensing and Control, ICNSC 2025
Country/TerritoryFinland
CityOulu
Period10/1/25 → 10/3/25

All Science Journal Classification (ASJC) codes

  • Artificial Intelligence
  • Computer Networks and Communications
  • Control and Optimization
  • Modeling and Simulation
  • Sensory Systems
  • Instrumentation

Keywords

  • genetic algorithm
  • particle swarm optimization
  • simulated annealing
  • Software testing
  • Test case generation

Fingerprint

Dive into the research topics of 'Automatic and Efficient Test Case Generation with High-diversity and Global-search Particle Swarm Optimization'. Together they form a unique fingerprint.

Cite this