Distroid: 基于强化学习的安卓应用分布式自动化测试框架
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP311

基金项目:

国家自然科学基金(62072108); 福建省技术创新重点攻关及产业化项目(2024XQ004)


Distroid: Distributed Automated Testing Framework for Android Applications Based on Reinforcement Learning
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    在敏捷开发与持续交付模式的推动下, 安卓应用的迭代周期日益缩短, 测试时间窗口被大幅压缩. 分布式测试扩展测试资源以提升并行执行能力, 有效保障了在高速迭代中安卓应用的交付质量. 尽管目前已有诸多工具致力于优化单设备上的测试效果, 但如何在有限资源和时间条件下进一步提升安卓应用自动化测试的并行效率, 仍然是一个亟待解决的关键问题. 提出一个名为Distroid的分布式自动化测试框架, 该框架对整体状态空间进行划分, 并引导各设备在测试过程中分别探索不同的UI子区域, 从而实现对安卓应用的自适应探索. 基于此协同机制, Distroid在每台测试设备上实施双层引导以提升测试质量与效率: 一方面, 通过好奇心驱动的强化学习构建高质量操作序列, 编码复杂用户交互的时序逻辑关系, 其奖励函数整合应用状态相似度计算方法, 在探索过程中提供底层引导. 另一方面, 为了避免陷入局部最优, Distroid在运行时逐步构建一个确定性有限自动机(deterministic finite automaton, DFA), 为测试提供高层次引导, 从而进一步提升测试效率与质量. 为验证Distroid的有效性, 在30款真实安卓应用上对其进行评估. 实验结果表明, Distroid在故障检测率、代码覆盖率和测试效率方面, 均优于现有最先进的安卓应用测试方法. 此外, Distroid共检测出41个故障, 其中26个此前尚未被报告.

    Abstract:

    Driven by agile development and continuous delivery practices, Android applications now have increasingly shorter iteration cycles, which significantly reduces the available testing window. Distributed testing increases available testing resources and improves parallel execution capability, thus helping ensure the quality of Android applications under rapid iteration. Although numerous existing tools focus on improving testing effectiveness on a single device, how to further enhance the parallel efficiency of automated Android testing under constrained resources and time remains a pressing challenge. This study proposes a distributed automated testing framework named Distroid, which partitions the overall state space and guides multiple devices to explore distinct UI subregions during testing, achieving adaptive exploration of Android applications. Based on this collaborative mechanism, Distroid adopts a two-level guidance strategy for each testing device to improve both testing effectiveness and efficiency. On one hand, a curiosity-driven reinforcement learning approach is adopted to construct high-quality action sequences that encode the temporal logic of complex user interactions. The reward function incorporates a method for computing application state similarity to provide low-level guidance during exploration. On the other hand, to avoid being trapped in local optima, Distroid incrementally constructs a deterministic finite automaton (DFA) at runtime to offer high-level guidance, further enhancing testing efficiency and quality. To evaluate the effectiveness of Distroid, experiments are conducted on 30 real-world Android applications. The results illustrate that Distroid attains higher failure detection rates, code coverage, and efficiency than the state-of-the-art Android testing approaches. In particular, Distroid detected 41 failures, and 26 of them were previously unknown.

    参考文献
    相似文献
    引证文献
引用本文

郑裕恒,宋日荣,陈俊洁,陈星. Distroid: 基于强化学习的安卓应用分布式自动化测试框架.软件学报,,():1-24

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-10-10
  • 最后修改日期:2025-12-16
  • 录用日期:
  • 在线发布日期: 2026-09-02
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号