Software Testing Optimization Using Genetic Algorithms
DOI:
https://doi.org/10.63345/Keywords:
Genetic Algorithm, Software Testing, Test-Suite Prioritization, Test-Data Generation, APFD, Mutation Testing, Coverage, Search-Based Software EngineeringAbstract
Software systems have grown so large and fast-moving that traditional testing strategies struggle to keep pace with delivery cycles and resource constraints. Search-Based Software Engineering (SBSE) reframes testing tasks as optimization problems; among SBSE techniques, Genetic Algorithms (GAs) offer a flexible, domain-agnostic way to explore vast test spaces and to trade off competing quality goals. This manuscript presents a practical, end-to-end GA framework for two high-impact testing problems—(i) test-suite prioritization for regression testing under execution-time budgets, and (ii) test-data generation for structural coverage. We formalize chromosome encodings, a multi-term fitness function combining predicted fault revelation (via APFD surrogate), structural coverage, mutation score, and execution time, and we design GA operators that preserve permutation constraints and encourage behavioral diversity using coverage-vector distances.
A controlled simulation study across five subject programs (1.5k–38k LOC) compares GA against random and greedy baselines under identical budgets. The GA improves APFD by 10.6–24.8 percentage points over random and 4.1–9.3 points over greedy coverage ordering, while meeting or reducing execution time budgets. Non-parametric tests (Wilcoxon) indicate statistical significance (p < 0.01) with large effect sizes (|d| ≥ 0.8). We include an ablation showing that removing the diversity term degrades early fault detection and increases redundancy. Results demonstrate that a well-tuned GA is both effective and robust for time-boxed regression testing and for reaching hard-to-cover branches. We conclude with guidance for parameterization, threats to validity, and opportunities for multi-objective extensions (e.g., Pareto optimization) and CI/CD integration.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 The journal retains copyright of all published articles, ensuring that authors have control over their work while allowing wide dissenmination.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Articles are published under the Creative Commons Attribution NonCommercial 4.0 License (CC BY NC 4.0), allowing others to distribute, remix, adapt, and build upon the work for non-commercial purposes while crediting the original author.






