@Article{iasc.2021.015708, AUTHOR = {Ahmed S. Ghiduk, Moheb R. Girgis, Eman Hassan, Sultan Aljahdali}, TITLE = {Automatic PSO Based Path Generation Technique for Data Flow Coverage}, JOURNAL = {Intelligent Automation \& Soft Computing}, VOLUME = {29}, YEAR = {2021}, NUMBER = {1}, PAGES = {147--164}, URL = {http://www.techscience.com/iasc/v29n1/42535}, ISSN = {2326-005X}, 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.}, DOI = {10.32604/iasc.2021.015708} }