Search-Based Algorithm With Scatter Search Strategy for Automated Test Case Generation of NLP Toolkit

Published: 2021, Last Modified: 18 May 2025IEEE Trans. Emerg. Top. Comput. Intell. 2021EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Natural language processing (NLP), as a theory-motivated computational technique, has extensive applications. Automated test case generation based on path coverage, which is a popular structural testing activity, can automatically reveal logic defects that exist in NLP programs and can save testing consumption. NLP programs have many paths that can only be covered by specific input variables. This feature makes conventional search-based algorithm very difficult covering all possible paths in NLP programs. A strategy is required for improving the search ability of search-based algorithms. In this paper, we propose a scatter search strategy to automatically generate test cases for covering all possible paths of NLP programs. The scatter search strategy empowers search-based algorithms to explore all input variables and cover the paths that require specific input variables within a small amount of test cases. The experiment results show that the proposed scatter search strategy can quickly cover the paths, which requires specific input variables. Many test cases and running time consumptions will be saved when search-based algorithms combine with scatter search strategy.
Loading