一句话:指出基于搜索的 Android 测试在变异事件序列时会截断原路径,提出时间旅行测试以复用关键应用状态。
Android 测试工具通过生成输入事件序列来探索被测应用的状态空间。现有基于搜索的技术往往维护一个事件序列种群,并以最大化代码覆盖率等目标进行系统进化,期望对高适应度序列的变异能产生更优序列。然而,事件序列的进化可能并不有效。论文的关键洞见是:原序列之所以具有高适应度,可能依赖于某些特定的应用状态,而变异后的事件序列未必能再次到达这些状态;原有穿越状态空间的路径在变异点处被截断,导致后续探索失去此前的有利状态。基于这一观察,作者提出时间旅行测试(time-travel testing),其核心思路是让测试在变异后仍能回到此前的关键应用状态,从而避免路径截断造成的适应度损失。论文以 Android 应用测试为场景,围绕事件序列生成与覆盖目标展开。
Android testing tools generate sequences of input events to exercise the state space of the app-under-test. Existing search-based techniques systematically evolve a population of event sequences so as to achieve certain objectives such as maximal code coverage. The hope is that the mutation of fit event sequences leads to the generation of even fitter sequences. However, the evolution of event sequences may be ineffective. Our key insight is that pertinent app states which contributed to the original sequence's fitness may not be reached by a mutated event sequence. The original path through the state space is truncated at the point of mutation.
DOI 原文 ·
@inproceedings{paperbot5652,
title = {Time-travel testing of Android apps},
author = {Zhen Dong and Marcel Böhme and Lucia Cojocaru and Abhik Roychoudhury},
booktitle = {ICSE},
year = {2020},
doi = {10.1145/3377811.3380402}
}