arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1607.03258cs.SE
收藏

面向Android应用的目标定向事件序列生成

Target Directed Event Sequence Generation for Android Applications

Jiwei Yan, Tianyong Wu, Jun Yan, Jian Zhang

摘要:

测试是保证软件质量的常用方法,其中基于模型的测试是测试Android应用程序等GUI程序的热门话题。现有的方法主要是动态地构建一个只包含GUI信息的模型,或者从代码的角度构建一个模型,而这个模型可能无法描述GUI控件在运行时的变化。此外,这些模型中的大多数不支持回栈,这是Android的一种特殊机制。因此,本文提出了一个模型LATTE,动态构造考虑的视图信息的窗口部件以及回栈,来描述GUI窗口部件之间的过渡。我们还提出了一个标签集链接的LATTE模型的元素程序片段。用户可以定义标签集的一个子集作为测试需求的目标,这些测试需求需要覆盖代码的某些特定部分。为了避免模型构建过程中的状态爆炸问题,我们引入了状态相似度的定义来平衡模型的精度和分析成本。基于该模型,提出了一种目标导向测试生成方法,生成事件序列以有效覆盖目标。在几个真实应用上的实验表明,基于LATTE生成的测试用例可以达到较高的覆盖率,并且利用该模型可以生成覆盖给定目标的短事件序列的事件序列。

英文摘要:

Testing is a commonly used approach to ensure the quality of software, of which model-based testing is a hot topic to test GUI programs such as Android applications (apps). Existing approaches mainly either dynamically construct a model that only contains the GUI information, or build a model in the view of code that may fail to describe the changes of GUI widgets during runtime. Besides, most of these models do not support back stack that is a particular mechanism of Android. Therefore, this paper proposes a model LATTE that is constructed dynamically with consideration of the view information in the widgets as well as the back stack, to describe the transition between GUI widgets. We also propose a label set to link the elements of the LATTE model to program snippets. The user can define a subset of the label set as a target for the testing requirements that need to cover some specific parts of the code. To avoid the state explosion problem during model construction, we introduce a definition "state similarity" to balance the model accuracy and analysis cost. Based on this model, a target directed test generation method is presented to generate event sequences to effectively cover the target. The experiments on several real-world apps indicate that the generated test cases based on LATTE can reach a high coverage, and with the model we can generate the event sequences to cover a given target with short event sequences.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑