Test Case Prioritization Using Ant Colony Optimization to Improve Fault Detection and Time
Main Article Content
Abstract
Regression testing plays a critical role in ensuring the reliability and quality of software following continuous integration and development. However, executing all test cases during regression testing can be time-consuming and resource-intensive. Test Case Prioritization (TCP) addresses this challenge by determining an optimal execution order of test cases that maximizes early fault detection while minimizing execution time. Optimization algorithms contribute significantly to enhancing the effectiveness of TCP while utilizing limited resources. This study proposes an Ant Colony Optimization (ACO) algorithm to address the TCP problem, leveraging its strength in navigating complex search spaces inspired by the foraging behavior of real ant colonies. It involves four phases: dataset selection, dataset conversion, algorithm implementation, and performance evaluation. ACO was implemented and evaluated on two datasets (Case Study One and Case Study Two) of differing sizes and complexity. The results demonstrate its potential to improve testing efficiency and effectiveness with limited resources using the Average Percentage Fault Detected (APFD) and execution time. Case Study One, which involved a larger dataset, achieved a higher APFD (0.6911), but required more iterations and execution time (0.3733 s). In contrast, Case Study Two, with fewer test cases and faults, demonstrated a faster convergence and execution time (0.2596 s), with a slightly lower APFD (0.6700). These findings demonstrate a trade-off between early fault detection and execution efficiency, indicating that dataset characteristics such as size and fault density influence the performance of the algorithm.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
All articles published in JIWE are licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) License. Readers are allowed to
- Share — copy and redistribute the material in any medium or format under the following conditions:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use;
- NonCommercial — You may not use the material for commercial purposes;
- NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material.
References
V. H. S. Durelli et al., “Machine Learning Applied to Software Testing: A Systematic Mapping Study,” IEEE Trans Reliab, vol. 68, no. 3, pp. 1189–1212, Sep. 2019, doi: 10.1109/TR.2019.2892517.
M. Khatibsyarbini, M. A. Isa, D. N. A. Jawawi, H. N. A. Hamed, and M. D. Mohamed Suffian, “Test Case Prioritization Using Firefly Algorithm for Software Testing,” IEEE Access, vol. 7, pp. 132360–132373, 2019, doi: 10.1109/ACCESS.2019.2940620.
A. Bajaj, and O. P. Sangwan, “A Systematic Literature Review of Test Case Prioritization Using Genetic Algorithms,” IEEE Access, vol. 7, pp. 126355–126375, 2019, doi: 10.1109/ACCESS.2019.2938260.
M. Khatibsyarbini, M. A. Isa, D. N. A. Jawawi, and R. Tumeng, “Test case prioritization approaches in regression testing: A systematic literature review,” Inf Softw Technol, vol. 93, pp. 74–93, Jan. 2018, doi: 10.1016/j.infsof.2017.08.014.
A. Bajaj, A. Abraham, S. Ratnoo, and L. A. Gabralla, “Test Case Prioritization, Selection, and Reduction Using Improved Quantum-Behaved Particle Swarm Optimization,” Sensors, vol. 22, no. 12, p. 4374, Jun. 2022, doi: 10.3390/s22124374.
N. M. Minhas, K. Petersen, J. Börstler, and K. Wnuk, “Regression testing for large-scale embedded software development – Exploring the state of practice,” Inf Softw Technol, vol. 120, p. 106254, Apr. 2020, doi: 10.1016/j.infsof.2019.106254.
P. R. Srivastava, V. Ramachandran, M. Kumar, G. Talukder, V. Tiwari, and P. Sharma, “Generation of test data using meta heuristic approach,” in TENCON 2008 - 2008 IEEE Region 10 Conference, IEEE, Nov. 2008, pp. 1–6, doi: 10.1109/TENCON.2008.4766707.
S. S. Vinod Chandra, “An Ant Colony Optimization Algorithm Based Automated Generation of Software Test Cases,” in International Conference on Swarm Intelligence 2020, pp. 231–239, doi: 10.1007/978-3-030-53956-6_21.
A. Bajaj, and O. P. Sangwan, “A Survey on Regression Testing Using Nature-Inspired Approaches,” in 2018 4th International Conference on Computing Communication and Automation (ICCCA), IEEE, Dec. 2018, pp. 1–5, doi: 10.1109/CCAA.2018.8777692.
B. Ba-Quttayyan, H. Mohd, and F. Baharom, “Regression testing – A protocol for systematic literature review,” In AIP Conference Proceedings, 2018, pp. 020032, doi: 10.1063/1.5055434.
M. A. Asyraf, M. Z. Sahid, and N. Zainal, “Comparative Analysis of Test Case Prioritization Using Ant Colony Optimization Algorithm and Genetic Algorithm,” Journal of Soft Computing and Data Mining, vol. 4, no. 2, Oct. 2023, doi: 10.30880/jscdm.2023.04.02.005.
T.K. Akila, and A. Malathi, “Test case prioritization using modified genetic algorithm and ant colony optimization for regression testing,” International Journal of Advanced Technology and Engineering Exploration, vol. 9, no. 88, Mar. 2022, doi: 10.19101/IJATEE.2021.874727.
C. Lu, J. Zhong, Y. Xue, L. Feng, and J. Zhang, “Ant Colony System With Sorting-Based Local Search for Coverage-Based Test Case Prioritization,” IEEE Trans Reliab, vol. 69, no. 3, pp. 1004–1020, Sep. 2020, doi: 10.1109/TR.2019.2930358.
P. Padmnav, G. Pahwa, D. Singh, and S. Bansal, “Test Case Prioritization based on Historical Failure Patterns using ABC and GA,” in 2019 9th International Conference on Cloud Computing, Data Science & Engineering (Confluence), IEEE, Jan. 2019, pp. 293–298, doi: 10.1109/CONFLUENCE.2019.8776936.
L. Z. Yue, and R. Ibrahim, “Comparative Analysis for Test Case Prioritization Using Particle Swarm Optimization and Firefly Algorithm,” Journal of Soft Computing and Data Mining, vol. 4, no. 2, Oct. 2023, doi: 10.30880/jscdm.2023.04.02.007.
A. P. Agrawal, and A. Kaur, “A Comprehensive Comparison of Ant Colony and Hybrid Particle Swarm Optimization Algorithms Through Test Case Selection,” In Data Engineering and Intelligent Computing: Proceedings of IC3T 2016, pp. 397–405, doi: 10.1007/978-981-10-3223-3_38.
M. Z. Zahir Ahmad, R. R. Othman, M. S. A. Rashid Ali, and N. Ramli, “A Self-Adapting Ant Colony Optimization Algorithm Using Fuzzy Logic (ACOF) for Combinatorial Test Suite Generation,” IOP Conf Ser Mater Sci Eng, vol. 767, no. 1, p. 012017, Feb. 2020, doi: 10.1088/1757-899X/767/1/012017.
K. K. Mohan, and N. Zainal, “Test Case Prioritization Using Swarm Intelligence Algorithm to Improve Fault Detection and Time for Web Application,” Journal of Soft Computing and Data Mining, vol. 4, no. 2, Oct. 2023, doi: 10.30880/jscdm.2023.04.02.006.
A. Zannou, A. Boulaalam, and E. H. Nfaoui, “Relevant node discovery and selection approach for the Internet of Things based on neural networks and ant colony optimization,” Pervasive Mob Comput, vol. 70, pp. 101311, Jan. 2021, doi: w10.1016/j.pmcj.2020.101311.
P. Palak, and P. Gulia, “Hybrid swarm and GA based approach for software test case selection,” International Journal of Electrical and Computer Engineering (IJECE), vol. 9, no. 6, pp. 4898, Dec. 2019, doi: 10.11591/ijece.v9i6.pp4898-4903.
K. Umanath, and D. Devika, “Optimization of electric discharge machining parameters on titanium alloy (ti-6al-4v) using Taguchi parametric design and genetic algorithm,” in MATEC Web of Conferences, EDP Sciences, Jun. 2018. doi: 10.1051/matecconf/201817204007.