GUI-based models extracted from Android app execution traces, events, or source code can be extremely useful for challenging tasks such as the generation of scenarios or test cases. However, extracting effective models can be an expensive process. Moreover, existing approaches for automatically deriving GUI-based models are not able to generate scenarios that include events which were not observed in execution (nor event) traces. In this paper, we address these and other major challenges in our novel hybrid approach, coined as MonkeyLab. Our approach is based on the Record-Mine-Generate-Validate framework, which relies on recording app usages that yield execution (event) traces, mining those event traces and generating execution scenarios using statistical language modeling, static and dynamic analyses, and validating the resulting scenarios using an interactive execution of the app on a real device. The framework aims at mining models capable of generating feasible and fully replayable (i.e., actionable) scenarios reflecting either natural user behavior or uncommon usages (e.g., corner cases) for a given app. We evaluated MONKEYLAB in a case study involving several medium-to-large open-source Android apps. Our results demonstrate that MonkeyLab is able to mine GUI-based models that can be used to generate actionable execution scenarios for both natural and unnatural sequences of events on Google Nexus 7 tablets.
翻译:从Android App 执行跟踪、事件或源代码中提取的基于图形的图形模型,对于产生假想或测试案例等具有挑战性的任务极为有用。然而,提取有效模型可能是一个昂贵的过程。此外,目前自动生成基于图形的模型的方法无法产生包括执行(非事件)跟踪中未观察到的事件的假想。在本文件中,我们处理我们新颖混合方法中的这些和其他重大挑战,即“MonkeyLab” 。我们的方法基于记录-Mine-Generate-Validate框架,该框架依赖记录产生执行(事件)跟踪的应用程序使用情况,利用统计语言模型、静态和动态分析挖掘这些事件的跟踪并生成执行假想,以及利用在实际设备上交互执行应用程序验证由此产生的假想。框架的目标是开发能够产生可行和完全可重现(即可操作的)假想情景的采矿模型,即反映自然用户行为,或反映不同用途(如基于7个角落案例)的假想。我们在一项涉及若干中到宏观的开源模型的案例研究的案例研究中,可以用来显示我们所使用的自然序列序列的模型。