Improving Search-based Test Case Generation with Local Search using Adaptive Simulated Annealing and Dynamic Symbolic Execution

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.
基于自适应模拟退火和动态符号执行的局部搜索改进基于搜索的测试用例生成
DynaMOSA是一种有效的基于搜索的测试用例生成算法。但是,它使用交替变量方法进行局部搜索。该方法采用贪婪策略,独立考虑优化函数的每个输入变量并尝试优化。这种搜索方法存在的问题是在搜索后期容易陷入局部最优解,搜索能力不足。这样的限制可能会导致搜索性能的急剧下降。为了解决这些问题,本文提出了一种基于自适应模拟退火和符号路径约束的局部搜索算法,在有限的时间预算内生成多个测试标准高覆盖率的测试用例。一方面,在搜索过程中选择模拟退火算法来探索候选解的邻域;另一方面,设计了各种模拟退火算子对每条语句进行搜索,增强了算法在各种程序中的适用性。此外,引入符号执行作为局部搜索模拟退火算法的补充,为具有复杂结构的输入生成测试用例。并在EvoSuite框架下实现了该算法。从SF110开源基准测试数据集中,根据被测类的复杂程度和目标数量,选择49个项目或110个类进行实验。在大多数项目上,本文算法在行覆盖、突变覆盖和多准则覆盖以及搜索效率方面都优于原算法生成高覆盖测试用例。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信