计算机科学与探索

• 学术研究 •    下一篇

覆盖导向的Android程序多入口测试方法

傅洁, 郭帆   

  1. 江西师范大学 计算机信息工程学院, 南昌 330022

Coverage-Guided Multi-Entry Testing for Android Applications

FU Jie,   GUO Fan   

  1. School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, China

摘要: 提高Android应用程序的质量是移动设备领域所面临的重要挑战。活动启动作为应用程序的核心功能之一,其正确性和可靠性将直接影响用户体验和应用质量。近期的研究表明,构建意图测试用例可有效检测与活动启动测试相关的问题,但现有方案在探索效率和发现深层崩溃方面仍存在限制。针对上述问题,文中提出一个新颖的解决方案CoMuBot。首先分析路径约束为意图生成合适的属性值,并结合意图模糊测试技术构建模糊的活动启动上下文,从而提高路径覆盖率和测试用例的多样性。接着设计动态的活动推荐算法及结合最先进的探索工具APE,实现了一个自适应的多入口探索策略。最后引入覆盖率引导的灰盒模糊测试思想,实现了一个高效的覆盖导向的多入口测试方法。实验结果表明,该方法在探索效率和活动启动准确性方面均优于工具Fax,其中方法覆盖率提升了25.63%,并以高达96.52%的准确率成功启动了62.23%的活动。同时,在独特崩溃检测方面,CoMuBot相比于Fax和DALT展现出了一定的优势,有效提高了应用程序的稳定性和可靠性。

关键词: 自动化GUI测试, ICC, 模糊测试, 符号执行, 移动应用程序

Abstract: Improving the quality of Android Applications is a significant challenge in the mobile device domain. Activity launch is one of the core functions of an application, and its correctness and reliability will directly affect the user experience and application quality. Recent research indicates that constructing intent test cases can effectively detect issues related to activity launching tests. However, existing solutions still face limitations regarding exploration efficiency and discovering deep crashes. To address these issues, this paper proposes a novel solution called CoMuBot. First, This article analyzes path constraints to generate appropriate attribute values for intents and combines intent fuzzing techniques to construct fuzzed activity launch contexts, thereby enhancing path coverage and the diversity of test cases. Subsequently, This paper designs a dynamic activity recommendation algorithm and combines it with the state-of-the-art exploration tool APE to achieve an adaptive multi-entry exploration strategy. Finally, incorporating the coverage-guided grey-box fuzzing idea, this article implements an efficient coverage-guided multi-entry testing method. Experimental results show that the proposed method outperforms the tool Fax regarding exploration efficiency and activity launch accuracy, with a 25.63% increase in method coverage and a high accuracy rate of 96.52% in successfully launching 62.23% of activities. Meanwhile, CoMuBot demonstrates certain advantages over Fax in detecting unique crashes, effectively enhancing the stability and reliability of the application.

Key words: automated GUI testing, ICC, fuzzing, symbolic execution, mobile applications