A Comparative Analysis of Bat and Genetic Algorithms for Test Case Prioritization in Regression Testing

Full Text (PDF, 318KB), PP.13-21

Views: 0 Downloads: 0

Author(s)

Anthony Wambua Wambua 1,2,* Geoffrey Mariga Wambugu 1

1. Department of Computer Science, School of Computing & Information Technology, Murang’a University of Technology, Murang’a, Kenya

2. Department of Computer Science, School of Science & Engineering, Daystar University, Nairobi, Kenya

* Corresponding author.

DOI: https://doi.org/10.5815/ijisa.2023.01.02

Received: 1 Aug. 2022 / Revised: 25 Oct. 2022 / Accepted: 11 Nov. 2022 / Published: 8 Feb. 2023

Index Terms

Test Case Prioritization, Bat Algorithm, Genetic Algorithm, Regression Testing, Nature-inspired Optimization Algorithms

Abstract

Regression testing is carried out to ensure that software modifications do not introduce new potential bugs to the existing software. Existing test cases are applied in the testing, such test cases can run into thousands, and there is not much time to execute all of them. Test Case Prioritization (TCP) is a technique to order test cases so that the test cases potentially revealing more faults are performed first. With TCP being deemed an optimization problem, several metaheuristic nature-inspired algorithms such as Bat, Genetic, Ant colony, and Firefly algorithms have been proposed for TCP. These algorithms have been compared theoretically or based on a single metric. This study employed an experimental design to offer an in-depth comparison of bat and genetic algorithms for TCP. Unprioritized test cases and a brute-force approach were used for comparison. Average Percentage Fault Detection (APFD)- a popular metric, execution time and memory usage were used to evaluate the algorithms’ performance. The study underscored the importance of test case prioritization and established the superiority of the Genetic algorithm over the bat algorithm for TCP in APFD. No stark differences were recorded regarding memory usage and execution time for the two algorithms. Both algorithms seemed to scale well with the growth of test cases.

Cite This Paper

Anthony Wambua Wambua, Geoffrey Mariga Wambugu, "A Comparative Analysis of Bat and Genetic Algorithms for Test Case Prioritization in Regression Testing", International Journal of Intelligent Systems and Applications(IJISA), Vol.15, No.1, pp.13-21, 2023. DOI:10.5815/ijisa.2023.01.02

Reference

[1]J. A. P. Lima and S. R. Vergilio, “Test Case Prioritization in Continuous Integration environments: A systematic mapping study,” Information and Software Technology, vol. 121, p. 106268, 2020.
[2]E. Cruciani, B. Miranda, R. Verdecchia, and A. Bertolino, “Scalable approaches for test suite reduction,” presented at the Proceedings of the 41st International Conference on Software Engineering, Montreal, Quebec, Canada, 2019. [Online]. Available: https://doi.org/10.1109/ICSE.2019.00055.
[3]R. Mukherjee and K. S. Patnaik, “A survey on different approaches for software test case prioritization,” Journal of King Saud University - Computer and Information Sciences, vol. 33, no. 9, pp. 1041-1054, 2021/11/01/ 2021, doi: https://doi.org/10.1016/j.jksuci.2018.09.005.
[4]M. Khatibsyarbini, M. A. Isa, D. N. A. Jawawi, and R. Tumeng, “Test case prioritization approaches in regression testing: A systematic literature review,” Information and Software Technology, vol. 93, pp. 74-93, 2018/01/01/ 2018, doi: https://doi.org/10.1016/j.infsof.2017.08.014.
[5]A. Bertolino, A. Guerriero, B. Miranda, R. Pietrantuono, and S. Russo, “Learning-to-rank vs ranking-to-learn: strategies for regression testing in continuous integration,” presented at the Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering, Seoul, South Korea, 2020. [Online]. Available: https://doi.org/10.1145/3377811.3380369.
[6]S. Chaudhary and R. Singh, “Test case prioritization using modified bat algorithm,” IJCSE, vol. 6, no. 7, pp. 145-149, 2018.
[7]A. Bajaj and O. P. Sangwan, “Test case prioritization using bat algorithm,” Recent Advances in Computer Science and Communications (Formerly: Recent Patents on Computer Science), vol. 14, no. 2, pp. 593-598, 2021.
[8]P. K. Gupta, “K-Step Crossover Method based on Genetic Algorithm for Test Suite Prioritization in Regression Testing,” J. Univers. Comput. Sci., vol. 27, no. 2, pp. 170-189, 2021.
[9]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.
[10]N. Gokilavani and B. Bharathi, “Test case prioritization to examine software for fault detection using PCA extraction and K-means clustering with ranking,” Soft Computing, vol. 25, no. 7, pp. 5163-5172, 2021.
[11]M. Bagherzadeh, N. Kahani, and L. Briand, “Reinforcement learning for test case prioritization,” IEEE Transactions on Software Engineering, 2021.
[12]A. Vescan, C.-M. Pintea, and P. C. Pop, “Test case prioritization—ANT algorithm with faults severity,” Logic Journal of the IGPL, vol. 30, no. 2, pp. 277-288, 2022.
[13]M. Khatibsyarbini, M. A. Isa, D. N. Jawawi, H. N. A. Hamed, and M. D. M. Suffian, “Test case prioritization using firefly algorithm for software testing,” IEEE Access, vol. 7, pp. 132360-132373, 2019.
[14]S. Katoch, S. S. Chauhan, and V. Kumar, “A review on genetic algorithm: past, present, and future,” Multimedia Tools and Applications, vol. 80, no. 5, pp. 8091-8126, 2021.
[15]M. Azizi, “A tag-based recommender system for regression test case prioritization,” in 2021 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW), 2021: IEEE, pp. 146-157.
[16]Q. Peng, A. Shi, and L. Zhang, “Empirically revisiting and enhancing IR-based test-case prioritization,” presented at the Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, Virtual Event, USA, 2020. [Online]. Available: https://doi.org/10.1145/3395363.3397383.
[17]O. Banias, “Test case selection-prioritization approach based on memoization dynamic programming algorithm,” Information and Software Technology, vol. 115, pp. 119-130, 2019.
[18]X.-S. Yang, “A new metaheuristic bat-inspired algorithm,” in nature inspired cooperative strategies for optimization (NICSO 2010): Springer, 2010, pp. 65-74.