一句话:针对过程间布尔标志导致分支距离无梯度的问题,恢复适应度梯度以指导搜索式测试生成。
基于搜索的软件测试依赖适应度函数估计测试用例距离未覆盖目标(如分支)的远近,常用分支距离衡量条件为真或为假的程度。然而,当条件读取布尔变量(如 if(x && y))时,布尔值只有真假两态,分支距离无法提供搜索梯度,即 flag 问题。已有工作可通过将单个过程中的布尔标志替换为数值比较来改善引导,但面对标志作为参数和返回值在过程间传递的情形,构造保持语义的变换十分困难,现代测试生成器尚未支持。本文聚焦于恢复过程间布尔标志的适应度梯度,目标是在过程间场景下提供有效的搜索引导;摘要未报告具体方法与实验评估结果。
In Search-based Software Testing (SBST), test generation is guided by fitness functions that estimate how close a test case is to reach an uncovered test goal (e.g., branch). A popular fitness function estimates how close conditional statements are to evaluating to true or false, i.e., the branch distance. However, when conditions read Boolean variables (e.g., if(x && y)), the branch distance provides no gradient for the search, since a Boolean can either be true or false. This flag problem can be addressed by transforming individual procedures such that Boolean flags are replaced with numeric comparisons that provide better guidance for the search. Unfortunately, defining a semantics-preserving transformation that is applicable in an interprocedural case, where Boolean flags are passed around as parameters and return values, is a daunting task. Thus, it is not yet supported by modern test generators.
@inproceedings{paperbot6081,
title = {Recovering fitness gradients for interprocedural Boolean flags in search-based testing},
author = {Yun Lin and Jun Sun and Gordon Fraser and Ziheng Xiu and Ting Liu and Jin Song Dong},
booktitle = {ISSTA},
year = {2020},
doi = {10.1145/3395363.3397358}
}