The International Arab Journal of Information Technology (IAJIT)

..............................
..............................
..............................


Effective Test Cases Generation with Harmony Search and RBF Neural Network

Software testing is one of the integral activities during development of software products. Generation and selection of the test cases either in static or dynamic form play pivot role for ensuring the quality of software products. There are numerous approaches in the literature for automatic generation of test cases but coverage criteria and fault detection rate are prominent metrics for checking the effectiveness of the software products during testing phase of software development. In the present, a new Harmony Radial Testing (HRT) is proposed by combining the concepts of Harmony Search Algorithm (HSA) and Radial Basis Function-Neural Network (RBF-NN) approaches. The main objective of the proposed HRT method is to generate automatic test cases by considering the criteria of branch coverage with improvement in the Maximum branch Coverage (MaxC), Average Coverage (AC) and Average Percentage Fault Detection (APFD) rates. The proposed approach combined with the Radial Basis Function (RBF), denoted as a HRT approach. The proposed approach is used to optimize harmony search over the randomly selected sample test cases, training the RBF-NN to simulate the fitness function. Seven Python codes have been tested through proposed approach and computed results are compared with Primal-Dual Genetic Algorithm (PDGA), Simple Genetic Algorithm (SGA) and random methods. It is observed that the proposed HRT algorithm optimizes consistently yielded reliable results, which may be used in future for enriching the software testing process by the software industries.

[1] Alsewari A., Poston R., Zamli K., Balfaqih M., and Aloufi K., “Combinatorial Test List Generation based on Harmony Search Algorithm,” Journal of Ambient Intelligence and Humanized Computing, vol. 13, no. 6, pp. 3361- 3377, 2020. https://doi.org/10.1007/s12652-020- 01696-7

[2] Aristoxenus., Macran., and Stewart H., Aristoxenus Harmonika Stoicheia. The Harmonics of Aristoxenus, Oxford, Clarendon Press, 1902. https://archive.org/details/aristoxenouharmo00ari suoft/aristoxenouharmo00arisuoft/

[3] Bao X., Xiong Z., Zhang N., Qian J., Wu B., and Zhang W., “Path-Oriented Test Cases Generation Based Adaptive Genetic Algorithm,” PloS One, vol. 12, no. 11, pp. 1-17, 2017. https://doi.org/10.1371/journal.pone.0187471

[4] Broomhead D. and Lowe D., “Multivariable Functional Interpolation and Adaptive Networks,” Complex Systems, vol. 2, pp. 321-355, 1988. https://sci2s.ugr.es/keel/pdf/algorithm/articulo/19 88-Broomhead-CS.pdf

[5] Buhmann M., “Radial Basis Functions,” Acta Numerica, vol. 9, pp. 1-38, 2000. https://doi.org/10.1017/S0962492900000015

[6] Chen T., Cheung S., and Yiu S., “Metamorphic Testing: A New Approach for Generating Next Test Cases,” arXiv Preprint, vol. arXiv:2002.12543, pp. 11, 2020. https://doi.org/10.48550/arXiv.2002.12543

[7] Clark A., Walkinshaw N., and Hierons R., “Test Case Generation for Agent-Based Models: A Systematic Literature Review,” Information and Software Technology, vol. 135, pp. 106567, 2021. https://doi.org/10.1016/j.infsof.2021.106567

[8] De Santiago Junior V., Ozcan E., and Balera J., “Many-Objective Test Case Generation for Graphical User Interface Applications Via Search- Based and Model-Based Testing,” Expert Systems with Applications, vol. 208, pp. 118075, 2022. https://doi.org/10.1016/j.eswa.2022.118075

[9] Ding S., Xu L., Su C., and Jin F., “An Optimizing Method of RBF Neural Network based on Genetic Algorithm,” Neural Computing and Applications, vol. 21, no. 2, pp. 333-336, 2012. DOI:10.1007/s00521-011-0702-7

[10] Dubey M., Kumar V., Kaur M., and Dao T., “A Systematic Review on Harmony Search Algorithm: Theory, Literature, and Applications,” Mathematical Problems in Engineering, vol. 2021, pp. 1-22, 2021. https://doi.org/10.1155/2021/5594267

[11] GeeksforGeeks, History of Software Testing, https://www.geeksforgeeks.org/history-of- software-testing/, Last Visited, 2024.

[12] Geem Z., Kim J., and Loganathan G., “A New Heuristic Optimization Algorithm: Harmony Search,” Simulation, vol. 76, no. 2, pp. 60-68, 2001. https://doi.org/10.1177/003754970107600201

[13] Ghiduk A. and Alharbi A., “Generating of Test Data by Harmony Search Against Genetic Algorithms,” Intelligent Automation and Soft Computing, vol. 36, no. 1, pp. 647-665, 2023. https://doi.org/10.32604/iasc.2023.031865

[14] Ghiduk A. and Alharbi A., “Generating Test Data using Harmony Search Versus Genetic Algorithms,” Intelligent Automation and Soft Computing, vol. 36, no. 1, pp. 647-665, 2023. https://www.techscience.com/iasc/v36n1/50002/html

[15] Hasan D., Hussan B., Zeebaree S., Ahmed D., Kareem O., and Sadeeq M., “The Impact of Test Case Generation Methods on the Software Performance: A Review,” International Journal of Science and Business, vol. 5, no. 6, pp. 33-44, 2021. https://ijsab.com/volume-5-issue-6/3860

[16] Hassoun M., Fundamentals of Artificial Neural Networks, MIT Press, 1995. https://books.google.jo/books/about/Fundamental s_of_Artificial_Neural_Networ.html?id=Otk32Y 3QkxQC&redir_esc=y

[17] Ibrahim R., Ahmed M., Nayak R., and Jamel S., “Reducing Redundancy of Test Cases Generation Using Code Smell Detection and Refactoring,” Journal of King Saud University-Computer and Information Sciences, vol. 32, no. 3, pp. 367-374, 2020. https://doi.org/10.1016/j.jksuci.2018.06.005

[18] Jalila A. and Mala D., “Automated Optimal Test Data Generation for OCL Specification with Harmony Search Algorithm,” International Journal of Business Intelligence and Data Mining, vol. 16, no. 2, pp. 231-259, 2020. https://doi.org/10.1504/IJBIDM.2020.104743

[19] Ji S., Chen Q., and Zhang P., “Neural Network- Based Test Case Generation for Data-Flow- Oriented Testing,” in Proceedings of the IEEE International Conference on Artificial Intelligence Testing, Newark, pp. 35-36, 2019. https://doi.org/10.1109/AITest.2019.00-11

[20] Lakshminarayana P. and SureshKumar T., “Automatic Generation and Optimization of Test Case Using Hybrid Cuckoo Search and Bee Colony Algorithm,” Journal of Intelligent Systems, vol. 30, no. 1, pp. 59-72, 2021. https://doi.org/10.1515/jisys-2019-0051

[21] Liashchynskyi P. and Liashchynskyi P., “Grid Search, Random Search, Genetic Algorithm: A Big Comparison for NAS,” arXiv Preprint, vol. arXiv:1912.06059, pp. 1-11, 2019. https://doi.org/10.48550/arXiv.1912.06059

[22] Lin J. and Yeh P., “Automatic Test Data Generation for Path Testing Using GAs,” Information Sciences, vol. 131, no. 1-4, pp. 47-64, 2001. https://doi.org/10.1016/S0020-0255(00)00093-1

[23] Liu Z., Yang X., Zhang S., Liu Y., Zhao Y., and Effective Test Cases Generation with Harmony Search and RBF Neural Network 799 Zheng W., “Automatic Generation of Test Cases Based on Genetic Algorithm and RBF Neural Network,” Mobile Information Systems, vol. 2021, no. 1, pp. 1-9, 2022. https://doi.org/10.1155/2022/1489063

[24] Mahalakshmi G., Vijayan V., and Antony B., “Named Entity Recognition for Automated Test Case Generation,” The International Arab Journal of Information Technology, vol. 15, no. 1, pp. 112- 120, 2018. https://www.iajit.org/PDF/January%202018,%20 No.%201/9172.pdf

[25] Manjarres D., Landa-Torres I., Gil-Lopez S., Del Ser J., Bilbao M., Salcedo-Sanz S., and Geem Z., “A Survey on Applications of the Harmony Search Algorithm,” Engineering Applications of Artificial Intelligence, vol. 26, no. 8, pp. 1818-1831, 2013. https://doi.org/10.1016/j.engappai.2013.05.008

[26] Muazu A. and Maiwada U., “PWiseHA: Harmony Search Algorithm for Test Suites Generation using Pairwise Techniques,” International Journal of Computer and Information Technology, vol. 9, no. 4, pp. 91-98, 2020. https://doi.org/10.24203/ijcit.v9i4.23

[27] Mulgrew B., “Applying Radial Basis Functions,” IEEE Signal Processing Magazine, vol. 13, no. 2, pp. 50-65, 1996. https://doi.org/10.1109/79.487041

[28] Musavi M., Ahmed W., Chan K., Faris K., and Hummels D., “On the Training of Radial Basis Function Classifiers,” Neural Networks, vol. 5, no. 4, pp. 595-603, 1992. https://www.sciencedirect.com/science/article/ab s/pii/S0893608005800383

[29] Pontes F., Amorim G., Balestrassi P., Paiva A., and Ferreira J., “Design of Experiments and Focused Grid Search for Neural Network Parameter Optimization,” Neurocomputing, vol. 186, pp. 22-34, 2016. https://doi.org/10.1016/j.neucom.2015.12.061

[30] Pradhan S., Ray M., and Swain S., “Transition Coverage-Based Test Case Generation from State Chart Diagram,” Journal of King Saud University- Computer and Information Sciences, vol. 34, no. 3, pp. 993-1002, 2022. https://doi.org/10.1016/j.jksuci.2019.05.005

[31] Qin F., Zain A., and Zhou K., “Harmony Search Algorithm and Related Variants: A Systematic Review,” Swarm and Evolutionary Computation, vol. 74, pp. 101126, 2022. https://doi.org/10.1016/j.swevo.2022.101126

[32] Schwenker F., Kestler H., and Palm G., “Three Learning Phases for Radial-Basis-Function Networks,” Neural Networks, vol. 14, no. 4-5, pp. 439-458, 2001. https://doi.org/10.1016/S0893- 6080(01)00027-2

[33] Solanki K., Singh Y., and Dalal S., “Experimental Analysis of m-ACO Technique for Regression Testing,” Indian Journal of Science and Technology, vol. 9, no. 30, pp. 1-7, 2016. DOI:10.17485/ijst/2016/v9i30/86588

[34] Su Q., Cai G., Hu Z., and Yang X., “Test Case Generation Using Improved Differential Evolution Algorithms with Novel Hypercube- Based Learning Strategies,” Engineering Applications of Artificial Intelligence, vol. 112, pp. 104840, 2022. https://doi.org/10.1016/j.engappai.2022.104840

[35] Sulaiman R., Jawawi D., and Halim S., “Cost- Effective Test Case Generation with the Hyper- Heuristic for Software Product Line Testing,” Advances in Engineering Software, vol. 175, pp. 103335, 2023. https://doi.org/10.1016/j.advengsoft.2022.103335

[36] Sun C., Liu B., Fu A., Liu Y., and Liu H., “Path- Directed Source Test Case Generation and Prioritization in Metamorphic Testing,” Journal of Systems and Software, vol. 183, pp. 111091, 2022. https://doi.org/10.1016/j.jss.2021.111091

[37] Zhang M., Ali S., and Yue T., “Uncertainty-Wise Test Case Generation and Minimization for Cyber-Physical Systems,” Journal of Systems and Software, vol. 153, pp. 1-21, 2019. https://doi.org/10.1016/j.jss.2019.03.011