A novel approach for code coverage testing using hybrid metaheuristic algorithm

被引:0
作者
Ahsan F. [1 ]
Anwer F. [1 ]
机构
[1] Department of Computer Science, Aligarh Muslim University, Aligarh
关键词
Code coverage; Genetic algorithm; Hybrid algorithm; Memetic algorithm; Particle swarm optimization; Path coverage; Software testing;
D O I
10.1007/s41870-024-01968-x
中图分类号
学科分类号
摘要
Testing is essential for the software’s success, but despite this, it is a time and resource-consuming activity. Therefore, researchers and practitioners continuously try to improve software testing automation to maximize test coverage and make it fast and reliable. Meta-heuristics are high-level frameworks that many researchers have used to generate test data for software testing. Maximizing test coverage would also indirectly help to find vulnerabilities in the code. In this paper, we have implemented an improved hybrid metaheuristic algorithm to generate test cases, utilizing particle swarm optimization (PSO) and genetic algorithm (GA) for path coverage testing criterion. The used fitness function is the combination of branch distance, approximation level and path distance. The proposed approach is a hybrid Particle Swarm Optimization and Genetic Algorithm (PSO-GA). We compared the meta-heuristics GA, PSO and Hybrid PSO-GA algorithm with different fitness functions. Moreover, the experimental result shows that the hybrid algorithm improves outcomes compared to GA and PSO for the combined fitness functions. This approach demonstrates noteworthy efficacy in addressing security vulnerabilities during testing, particularly due to its emphasis on comprehensive path testing. This methodology has yielded significant outcomes in the realm of security testing, highlighting its potential for practical application and exploration in research. Furthermore, more meta-heuristics can be incorporated into the hybrid approach. © Bharati Vidyapeeth's Institute of Computer Applications and Management 2024.
引用
收藏
页码:3691 / 3701
页数:10
相关论文
共 32 条
  • [1] Ahsan F., Anwer F., A critical review on search-based security testing of programs, Comput Intell Select Proc InCITe, 2022, pp. 207-225, (2023)
  • [2] Aivaliotis-Apostolopoulos P., Loukidis D., Swarming genetic algorithm: a nested fully coupled hybrid of genetic algorithm and particle swarm optimization, PLoS ONE, 17, 9, (2022)
  • [3] Ali S., Anwer F., Secure IoT framework for authentication and confidentiality using hybrid cryptographic schemes, Int J Inf Technol, (2024)
  • [4] Anwer F., Nazir M., Mustafa K., Safety and security framework for exception handling in concurrent programming, In: 2013 Third International Conference on Advances in Computing and Communications. IEEE, pp. 308-311, (2013)
  • [5] Anwer F., Nazir M., Mustafa K., Automatic testing of inconsistency caused by improper error handling: A safety and security perspective, . In: Proceedings of the 2014 International Conference on Information and Communication Technology for Competitive Strategies, pp. 1-5, (2014)
  • [6] Anwer F., Nazir M., Mustafa K., Testing program for security using symbolic execution and exception injection, Indian J Sci Technol, 9, (2016)
  • [7] Anwer F., Nazir M., Mustafa K., Security testing, Trends Softw Test, pp. 35-66, (2017)
  • [8] Anwer F., Nazir M., Mustafa K., Testing program crash based on search based testing and exception injection, In: International Conference on Security & Privacy., pp. 275-285, (2019)
  • [9] Blum C., Puchinger J., Raidl G.R., Roli A., Et al., A brief survey on hybrid metaheuristics, Proceedings of BIOMA, pp. 3-18, (2010)
  • [10] Colanzi T.E., Assuncao W.K., Vergilio S.R., Farah P.R., Guizzo G., The symposium on search-based software engineering: past, present and future, Inf Softw Technol, 127, (2020)