Automating Test Data Generation for Critical Paths in Programs Under Test Using an Improved Coati Optimization Algorithm
The software testing process accounted for nearly forty percent of the total software development cost, and one of the most important parts of software testing was test data generation. Performing this process manually led to slowdowns, increased costs, and errors. Therefore, we sought an automated method for generating this set to identify the maximum number of defects. In the process of generating test data, the problem could be transformed into an optimization problem, as their ability to intelligently search in the vast input space and reduce costs and time was superior. Thus, search algorithms could be used to generate test data. Genetic algorithms, particle swarm optimization, etc. were among the most widely used algorithms in this field, but previous algorithms also had drawbacks. In recent years, newer optimization algorithms with better performance were introduced. In this paper, the Coati Optimization Algorithm (COA) was used. This algorithm had lower complexity, appropriate exploration and exploitation phases, and lacked initial parameters compared to previous algorithms. However, the Coati Optimization Algorithm also included weaknesses. Under certain conditions, a solution might never move towards the best solution. Therefore, in this paper, an idea was proposed to improve the performance of the Coati Optimization Algorithm in corrective search ability. Optimization algorithms also needed guidance for search, and the stronger and faster this guidance, the better the quality of the obtained solutions. In this paper, a new fitness function was introduced, which had better performance compared to other fitness functions. Before applying the search algorithm to the data generation problem, first, the control flow graph of the program under test had to be drawn. Then, the execution paths of this program were extracted from the graph, so that the algorithm could generate test data by running on it. However, it should be noted that we would not be able to cover all paths of the program under test. For this purpose, a new idea for prioritizing paths was proposed in this paper, which were referred to as critical paths. To evaluate the performance of the proposed methods, we ran the new ideas on several well-known test programs and compared them with the results obtained from other optimization algorithms. Compared algorithms include: genetic algorithm (GA), particle swarm optimization (PSO), Pelican Optimization Algorithm (POA), Lyrebird optimization algorithm (LOA), Teaching-Learning-Based Optimization (TLBO) and Standard Coati Optimization Algorithm (COA). The obtained results indicated the superiority of the proposed methods.
Authors
- Amirhossein Damia
- Mehdi Esnaashari (ORCID: https://orcid.org/0000-0001-7874-2563)
- Erfaneh Khanmohammadi
- Hadi Bahrampoor
Institutions
- Islamic Azad University, Science and Research Branch (IR)
- Amirkabir University of Technology (IR)
- Islamic Azad University Yasuj (IR)
- K. N. Toosi University of Technology (IR)
Publication Details
- Published
- 2024-10-23
- DOI
- https://doi.org/10.1109/icis64839.2024.10887471
- Citations
- 3
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 1.46