AI 中文总结
本文提出DroidGraph框架,结合静态分析与系统探索性测试为Android应用生成控制流模型,实验显示其能提升应用交互覆盖度并发现更多代码组件与回调链接。
AI 中文摘要
移动应用开发是一个节奏快速的行业,发布频率很高。随着开发节奏的加快,对自动化测试生成的需求也随之增加。基于模型的测试生成是满足这一需求最常见且最成功的方法之一。理解和对被测应用程序进行建模,对于生成全面、可靠且有效的测试至关重要。然而,Android等移动平台带来了诸多困难:静态分析难以应对Android基于事件的特性,以及开发者实现不同功能可用的机制日益多样化;此外,流行的随机测试生成器所采用的动态分析速度慢、效率低,且受限于缺乏应用程序知识。本文介绍了DroidGraph框架,该框架结合传统静态分析和高效的系统探索性测试,用于生成Android应用程序的全面控制流模型。DroidGraph提供了Android应用程序的详细模型,从底层方法语句到高层用户界面结构,此模型可用于支持自动化测试生成。我们将DroidGraph应用于19个不同的应用程序,结果显示,与常用的随机探索相比,我们的高效探索性测试平均多与应用程序的18%部分进行交互,且交互次数减少了345次;整合这些测试提供的动态分析结果,补充了我们的静态分析,平均在应用程序代码中发现了51个更多组件和49%更多的界面回调链接。
英文摘要
Mobile application development is a fast paced industry with frequent releases. While the development pace increases, so too does the need for automated test generation. Model-based test generation is one of the most common and successful approaches to support this need. Understanding and modelling the application under test is integral to producing comprehensive, dependable and effective tests. Unfortunately, mobile platforms such as Android, introduce a host of difficulties. Static analysis struggles with Android's event-based nature and the growing variety of mechanisms available for developers to implement different features. Additionally, dynamic analysis, implemented by popular random test generators, is slow, inefficient, and limited by a lack of application knowledge. This paper introduces DroidGraph, a framework to generate a comprehensive control flow model of Android applications using traditional static analysis and efficient systematic exploratory tests. DroidGraph provides a detailed model of an Android application, from low level method statements to high level user interface structures. This model can be used to support automated test generation. We apply DroidGraph to 19 diverse apps and show that our efficient exploratory tests, on average, interact with 18% more of the app than commonly used random exploration in 345 less interactions. Integrating the dynamic analysis results provided by these tests complements our static analysis, and uncovers on average 51 more components and 49% more interface callback links in the application code.
Journal ref10th International Conference on Dependable Systems and Their Applications (DSA), pp. 94-104. IEEE, 2023
DOI:10.1109/DSA59317.2023.00022