Abstract:
"Software testing is crucial for verifying program behavior, but as test suites grow due to the increasing complexity of modern software systems and frequent changes requiring regression testing, executing these extensive suites becomes impractical. This leads to inefficiencies, high costs, and delays, particularly in regression testing. Therefore, optimizing test suites is essential to reduce their size while maintaining effectiveness. This research addresses the high cost and inefficiency of software testing caused by redundant, obsolete, and broken test cases, necessitating the development of optimization methods to overcome these challenges.
To solve this problem, a hybrid Genetic Algorithm-Particle Swarm Optimization (GeneticPSO) algorithm was proposed. This algorithm combines the exploration capabilities of Genetic Algorithms (GA) with the exploitation strengths of Particle Swarm Optimization (PSO). The GeneticPSO algorithm initializes populations for both GA and PSO, evaluates their fitness, and alternates between GA and PSO operations to generate diverse solutions and fine-tune them iteratively. GA uses selection, crossover, and mutation to evolve solutions, while PSO updates particle velocities and positions based on personal and global bests. The hybrid approach effectively optimizes test case selection and execution by integrating the diverse solution generation of GA with the fine-tuning ability of PSO.
Performance testing was conducted to compare the GeneticPSO algorithm's execution efficiency against the original GA and PSO algorithms. The tests involved running each algorithm multiple times under identical conditions and recording the number of iterations and execution times. The results showed that the GeneticPSO algorithm significantly outperformed both GA and PSO, with execution times of 0.33 seconds compared to 0.61 seconds for GA and 0.47 seconds for PSO. These findings highlight the improved efficiency and robustness of the GeneticPSO algorithm, making it more suitable for real-world applications requiring quick and efficient solutions. The performance testing demonstrates that the hybrid approach not only maintains robust optimization capabilities but also achieves faster execution."