Open Access iconOpen Access

ARTICLE

crossmark

Automatic PSO Based Path Generation Technique for Data Flow Coverage

Ahmed S. Ghiduk1,*, Moheb R. Girgis3, Eman Hassan2,4, Sultan Aljahdali1

1 College of Computers and Information Technology, Taif University,PO BOX 11099, Taif, 21944,Saudi Arabia
2 Dept. of Mathematics and Computer Science, Faculty of Science, Beni-Suef University,Beni-Suef, 62521,Egypt
3 Dept. of Computer Science, Faculty of Science, Minia University,Minia,Egypt
4 Faculty of Computing and IT, Northern Border University,Saudi Arabia

* Corresponding Author: Ahmed S. Ghiduk. Email: email

Intelligent Automation & Soft Computing 2021, 29(1), 147-164. https://doi.org/10.32604/iasc.2021.015708

Abstract

Path-based testing involves two main steps: 1) finding all paths throughout the code under test; 2) creating a test suite to cover these paths. Unfortunately, covering all paths in the code under test is impossible. Path-based testing could be achieved by targeting a subset of all feasible paths that satisfy a given testing criterion. Then, a test suite is created to execute this paths subset. Generating those paths is a key problem in path testing. In this paper, a new path testing technique is presented. This technique employs Particle Swarm Optimization (PSO) for generating a set of paths to satisfy the all-uses criterion. To construct such paths for programs with loops, the proposed technique applies the ZOT-criterion. This criterion selects paths that traverse loops 0, 1, and 2 times. The proposed technique utilizes the decision-decision graph of the program under test to represent the position vector of the particle. To evaluate the efficiency of the presented technique, an empirical study has been conducted, which included 15 C# programs. In this study, the proposed technique has been compared with a genetic algorithm (GA)-based one. The results showed that the PSO required 199 generations, while the GA required 349 generations, to satisfy all def-use paths of all programs. In addition, the proposed technique required a smaller number of paths than the GA-based one.

Keywords


Cite This Article

APA Style
Ghiduk, A.S., Girgis, M.R., Hassan, E., Aljahdali, S. (2021). Automatic PSO based path generation technique for data flow coverage. Intelligent Automation & Soft Computing, 29(1), 147-164. https://doi.org/10.32604/iasc.2021.015708
Vancouver Style
Ghiduk AS, Girgis MR, Hassan E, Aljahdali S. Automatic PSO based path generation technique for data flow coverage. Intell Automat Soft Comput . 2021;29(1):147-164 https://doi.org/10.32604/iasc.2021.015708
IEEE Style
A.S. Ghiduk, M.R. Girgis, E. Hassan, and S. Aljahdali, “Automatic PSO Based Path Generation Technique for Data Flow Coverage,” Intell. Automat. Soft Comput. , vol. 29, no. 1, pp. 147-164, 2021. https://doi.org/10.32604/iasc.2021.015708



cc Copyright © 2021 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 1663

    View

  • 1042

    Download

  • 0

    Like

Share Link