Abstract
Regression testing is essential for continuous integration and continuous development. It is needed to ensure that the modifications have not produced any errors or faults, thereby maintaining the quality and reliability of the software. The testers usually avoid exhaustive retesting because it requires lots of effort and time. The test case prioritization and minimization solve the issue by scheduling the critical test cases and removing redundant ones. Optimization techniques help by improving the efficiency of these techniques while utilizing limited resources. This paper proposed an enhanced discrete novel bat algorithm for the test case prioritization. The algorithm is modified in two ways. First, we have proposed a fix-up mechanism for the discrete combinatorial problem, which conducts the perturbation in the population using the asexual reproduction algorithm. Second, the novel bat algorithm is improved, where the bats hunt in different habitats with quantum behavior using Gaussian distribution and search in the limited habitat with Doppler effect. In addition, we have embedded the test case minimization procedure in the algorithm for redundancy reduction. The experimental results are empirically analyzed using different testing criteria, i.e., fault and statement coverage on three subject programs from the software infrastructure repository. Consequently, test selection percentage, coverage loss, fault detection loss, and cost reduction percentages are deduced for the test case minimization at program and version levels. Empirical results and statistical comparisons with the random search, bat algorithm, novel bat algorithm, birds swarm algorithm, whale optimization algorithm, and genetic algorithm show the outperformance of the proposed algorithm.
Similar content being viewed by others
Data availability
Enquiries about data availability should be directed to the authors.
References
Ahmed BS (2016) Test case minimization approach using fault detection and combinatorial optimization techniques for configuration-aware structural testing. Eng Sci Technol Int J 19(2):737–753
Bajaj A, Abraham A (2021) Prioritizing and minimizing test cases using dragonfly algorithms. Int J Comput Inf Syst Ind Manage Appl 13:062–071
Bajaj A, Sangwan OP (2018) A Survey on Regression Testing using Nature-Inspired Approaches. In: Proceedings of 4th International Conference on Computing, Communication and Automation (ICCCA), IEEE, pp 1–5
Bajaj A, Sangwan OP (2019a) A systematic literature review of test case prioritization using genetic algorithms. IEEE Access 7:126355–126375
Bajaj A, Sangwan OP (2019b) Study the impact of parameter settings and operators role for genetic algorithm based test case prioritization. In: Proceedings of International Conference on Sustainable Computing in Science, Technology and Management, Available at SSRN: https://ssrn.com/abstract=3356318 or https://doi.org/10.2139/ssrn.3356318, Elsevier, pp 1564–1569
Bajaj A, Sangwan OP (2020) Nature-inspired approaches to test suite minimization for regression testing. In: Computational Intelligence Techniques and Their Applications to Software Engineering Problems CRC Press, pp 99–110
Bajaj A, Sangwan OP (2021a) Discrete and combinatorial gravitational search algorithms for test case prioritization and minimization. Int J Inf Technol 13:817–823
Bajaj A, Sangwan OP (2021b) Discrete Cuckoo search algorithms for test case prioritization. Appl Soft Comput. https://doi.org/10.1016/j.asoc.2021.107584
Bajaj A, Sangwan OP (2021c) Test case prioritization using bat algorithm. Recent Adv Comput Sci Commun. https://doi.org/10.2174/2213275912666190226154344
Bajaj A, Sangwan OP (2021d) Tri-level regression testing using nature-inspired algorithms. Innovations Syst Softw Eng 17(1):1–16
Bharathi M (2022) Hybrid particle swarm and ranked firefly metaheuristic optimization-based software test case minimization. Int J Appl Metaheuristic Comput (IJAMC) 13(1):1–20
Chouhan VK, Khan SH, Hajiaghaei-Keshteli M, Subramanian S (2020) Multi-facility-based improved closed-loop supply chain network for handling uncertain demands. Soft Comput 24:7125–7147. https://doi.org/10.1007/s00500-020-04868-x
Dhiman G, Kumar V (2018) Emperor penguin optimizer: a bio-inspired algorithm for engineering problems. Knowl-Based Syst 159:20–50
Do H, Mirarab S, Tahvildari L, Rothermel G (2010) The effects of time constraints on test case prioritization: a series of controlled experiments. IEEE Trans Software Eng 36(5):593–617
Eghbali S, Tahvildari L (2016) Test case prioritization using lexicographical ordering. IEEE Trans Softw Eng 42(12):1178–1195
Elbaum S, Malishevsky AG, Rothermel G (2002) Test case prioritization: a family of empirical studies. IEEE Trans Softw Eng 28(2):159–182
Farasat A, Menhaj MB, Mansouri T, Moghadam MRS (2010) ARO: A new model-free optimization algorithm inspired from asexual reproduction. Appl Soft Comput 10(4):1284–1292
Fister Jr I, Yang XS, Fister I, Brest J, Fister D, (2013) A brief review of nature-inspired algorithms for optimization. arXiv preprint arXiv, pp 1307.4186.
Gandomi AH, Yang XS (2014) Chaotic bat algorithm. J Comput Sci 5(2):224–232
Gautham S, Rajamohan J (2016) Economic load dispatch using novel bat algorithm. In: 2016 IEEE 1st International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES), IEEE, pp 1–4
Hashim NL, Dawood YS (2018) Test case minimization applying firefly algorithm. Int J Adv Sci Eng Inform Technol 8(4–2):1777–1783
Huang X, Li C, Pu Y, He B (2019) Gaussian quantum bat algorithm with direction of mean best position for numerical function optimization. Comput Intell Neurosci 2019:1–18
Kaur A, Agrawal AP (2017) A comparative study of bat and cuckoo search algorithm for regression test case selection. In: 2017 7th International Conference on Cloud Computing, Data Science & Engineering-Confluence, IEEE, pp 164–170
Khatibsyarbini M, Isa MA, Jawawi DN, Hamed HNA, Suffian MDM (2019) Test case prioritization using firefly algorithm for software testing. IEEE Access 7:132360–132373
Li Z, Harman M, Hierons RM (2007) Search algorithms for regression test case prioritization. IEEE Trans Softw Eng 33(4):225–237
Mahdi FP, Vasant P, Abdullah-Al-Wadud M, Kallimani V, Watada J (2019) Quantum-behaved bat algorithm for many-objective combined economic emission dispatch problem using cubic criterion function. Neural Comput Appl 31(10):5857–5869
Malishevsky AG, Ruthruff JR, Rothermel G, Elbaum S (2006) Cost-cognizant test case prioritization. Technical report TR-UNL-CSE-2006–0004, University of Nebraska-Lincoln, pp 97–106
Mann M, Tomar P, Sangwan OP (2018) Bio-inspired metaheuristics: evolving and prioritizing software test data. Appl Intell 48(3):687–702
Mansouri T, Farasat A, Menhaj MB, Moghadam MRS (2011) ARO: a new model free optimization algorithm for real time applications inspired by the asexual reproduction. Expert Syst Appl 38(5):4866–4874
Marchetto A, Islam MM, Asghar W, Susi A, Scanniello G (2015) A multi-objective technique to prioritize test cases. IEEE Trans Softw Eng 42(10):918–940
Mei H, Hao D, Zhang L, Zhang L, Zhou J, Rothermel G (2012) A static approach to prioritizing junit test cases. IEEE Trans Software Eng 38(6):1258–1275
Meng X, Liu Y, Gao X, Zhang H (2014) A new bio-inspired algorithm: chicken swarm optimization. In International conference in swarm intelligence, Springer, Cham, pp 86–94
Meng XB, Gao XZ, Liu Y, Zhang H (2015) A novel bat algorithm with habitat selection and Doppler Effect in echoes for optimization. Expert Syst Appl 42(17–18):6350–6364
Meng X, Gao X, Lu L, Liu Y, Zhang H (2016) A new bio-inspired optimisation algorithm: Bird Swarm Algorithm. J Exp Theor Artif Intell 28(4):673–687. https://doi.org/10.1080/0952813X.2015.1042530
Mirjalili S, Lewis A (2016) The whale optimization algorithm. Adv Eng Softw 95:51–67
Mohapatra SK, Prasad S (2015) Test case reduction using ant colony optimization for object oriented program. Int J Electr Comput Eng 5(6):2088–8708
Nawi NM, Rehman MZ, Khan A, Chiroma H, Herawan T (2016) A modified bat algorithm based on Gaussian distribution for solving optimization problem. J Comput Theor Nanosci 13(1):706–714
Osaba E, Yang XS, Diaz F, Lopez-Garcia P, Carballedo R (2016) An improved discrete bat algorithm for symmetric and asymmetric traveling salesman problems. Eng Appl Artif Intell 48:59–71
Osaba E, Yang XS, Fister I Jr, Del Ser J, Lopez-Garcia P, Vazquez-Pardavila AJ (2019) A discrete and improved bat algorithm for solving a medical goods distribution problem with pharmacological waste collection. Swarm Evol Comput 44:273–286
Öztürk MM (2018) A bat-inspired algorithm for prioritizing test cases. Vietnam J Computer Sci 5(2018):45–57
Riffi ME, Saji Y, Barkatou M (2017) Incorporating a modified uniform crossover and 2-exchange neighborhood mechanism in a discrete bat algorithm to solve the quadratic assignment problem. Egypt Inform J 18(3):221–232
Rothermel G, Untch RH, Chu C, Harrold MJ, (1999) Test case prioritization: An empirical study. In: Proceedings IEEE international conference on software maintenance-1999 (ICSM'99).'Software Maintenance for Business Change'(Cat. No. 99CB36360). IEEE, pp 179–188.
Saji Y, Riffi ME (2016) A novel discrete bat algorithm for solving the travelling salesman problem. Neural Comput Appl 27(7):1853–1866
Sugave SR, Patil SH, Reddy BE (2018) DIV-TBAT algorithm for test suite reduction in software testing. IET Softw 12(3):271–279
Tang J, Zhang R, Yao Y, Zhao Z, Wang P, Li H, Yuan J (2018) Maximizing the spread of influence via the collective intelligence of discrete bat algorithm. Knowl-Based Syst 160:88–103
Yang XS (2010) A new metaheuristic bat-inspired algorithm. Nature inspired cooperative strategies for optimization. Springer, Berlin, Heidelberg, pp 65–74
Yang XS, He X (2013) Bat algorithm: literature review and applications. Int J Bio-Inspired Comput 5(3):141–149
Yoo S, Harman M (2012) regression testing minimization, selection and prioritization: a survey. Softw Test Verif Reliab 22(2):67–120
Zhao D, He Y (2016) A novel binary bat algorithm with chaos and Doppler Effect in echoes for analog fault diagnosis. Analog Integr Circ Sig Process 87(3):437–450
Zhou Y, Luo Q, Xie J, Zheng H (2016) A hybrid bat algorithm with path relinking for the capacitated vehicle routing problem. In: Metaheuristics and Optimization in Civil Engineering, Springer, Cham, pp 255–276
Funding
The University Grants Commission, India supports this work under the JRF-NET scheme with reference number 3469/(NET-DEC. 2014).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Bajaj, A., Sangwan, O.P. & Abraham, A. Improved novel bat algorithm for test case prioritization and minimization. Soft Comput 26, 12393–12419 (2022). https://doi.org/10.1007/s00500-022-07121-9
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00500-022-07121-9