Dongcheng Li, W. E. Wong, Shenglong Li, Matthew Chau
{"title":"Improving Search-based Test Case Generation with Local Search using Adaptive Simulated Annealing and Dynamic Symbolic Execution","authors":"Dongcheng Li, W. E. Wong, Shenglong Li, Matthew Chau","doi":"10.1109/DSA56465.2022.00047","DOIUrl":null,"url":null,"abstract":"DynaMOSA is an effective search-based test case generation algorithm. However, it uses an alternating variable method for local search. This method follows a greedy strategy that considers each input variable of an optimization function independently and attempts to optimize it. Some problems with this kind of search are that it can easily become stuck in the local optimal solution and its search capability becomes inadequate in the late stage of the search. Such constraints may lead to a dramatic drop in search performance. To solve these problems, this study proposed a local search algorithm based on adaptive simulated annealing and symbolic path constraints to generate test cases with high coverage for multiple testing criteria within a limited time budget. On the one hand, the simulated annealing algorithm was selected to explore the neighborhood of candidate solutions during the search. On the other hand, various simulated annealing operators were designed for the search of each statement to enhance the applicability of the algorithm in various programs. Additionally, symbolic execution was introduced as a supplement to the simulated annealing algorithm for local search to generate test cases for inputs with complex structures. Furthermore, the proposed algorithm was implemented in EvoSuite framework. From an SF110 open-source benchmarking dataset, 49 projects or 110 classes were selected according to the complexity and number of objectives of each class under test to conduct the experiments. The proposed algorithm outperformed the original algorithm in generating high coverage test cases on most projects in terms of line, mutation, and multicriteria coverage as well as search efficiency.","PeriodicalId":208148,"journal":{"name":"2022 9th International Conference on Dependable Systems and Their Applications (DSA)","volume":"59 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 9th International Conference on Dependable Systems and Their Applications (DSA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/DSA56465.2022.00047","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
Abstract
DynaMOSA is an effective search-based test case generation algorithm. However, it uses an alternating variable method for local search. This method follows a greedy strategy that considers each input variable of an optimization function independently and attempts to optimize it. Some problems with this kind of search are that it can easily become stuck in the local optimal solution and its search capability becomes inadequate in the late stage of the search. Such constraints may lead to a dramatic drop in search performance. To solve these problems, this study proposed a local search algorithm based on adaptive simulated annealing and symbolic path constraints to generate test cases with high coverage for multiple testing criteria within a limited time budget. On the one hand, the simulated annealing algorithm was selected to explore the neighborhood of candidate solutions during the search. On the other hand, various simulated annealing operators were designed for the search of each statement to enhance the applicability of the algorithm in various programs. Additionally, symbolic execution was introduced as a supplement to the simulated annealing algorithm for local search to generate test cases for inputs with complex structures. Furthermore, the proposed algorithm was implemented in EvoSuite framework. From an SF110 open-source benchmarking dataset, 49 projects or 110 classes were selected according to the complexity and number of objectives of each class under test to conduct the experiments. The proposed algorithm outperformed the original algorithm in generating high coverage test cases on most projects in terms of line, mutation, and multicriteria coverage as well as search efficiency.