paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A framework for automated test mocking of mobile apps

移动应用自动化测试 mock 的框架
ASE Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering2020匹配度 1/10 · 论文关注移动应用测试中的自动 mock 生成与录制回放,属于软件测试/程序合成,但与用户核心方向(静态分析、Agentic/LLM、浮点程序分析、贝叶斯程序分析)几乎没有交集,也未涉及 LLM/Agent 或形式化验证。引用 14 inbox
Mattia Fazzini, Alessandra Gorla, Alessandro Orso
crossref: 2026-09-12

AI 速览

一句话:提出 MOKA 框架,自动收集并生成可复用的移动应用测试 mock,支持程序合成与录制回放两种方式。

移动应用广泛与环境交互,导致测试常需完整环境且易出现不确定性引起的 flakiness。手动创建测试 mock 耗时且易错,生成的 mock 通常仅适用于特定测试,难以复用。为此,作者提出 MOKA:一个自动收集并生成可复用测试 mock 的通用框架。MOKA 通过观察应用与环境的大量交互,采用迭代方式生成两类可复用特性不同的 mock:理想情况下基于程序合成的高级 mock,以及作为回退方案的基于录制-回放的基础 mock。论文介绍了 MOKA 的核心思想、主要特性、初步实证研究以及可受益的应用场景。

问题
移动应用测试依赖真实环境,环境交互导致测试难以执行、易 flaky,手工 mock 费时且复用性差。
方法
MOKA 观察大量应用-环境交互,迭代式自动生成可复用 mock:优先程序合成高级 mock,回退为录制-回放基础 mock。
评估
通过初步实证研究考察 MOKA 的可行性与特性,并讨论其可应用的场景;摘要未报告大规模定量结果。
原文摘要(Abstract)

Mobile apps interact with their environment extensively, and these interactions can complicate testing activities because test cases may need a complete environment to be executed. Interactions with the environment can also introduce test flakiness, for instance when the environment behaves in non-deterministic ways. For these reasons, it is common to create test mocks that can eliminate the need for (part of) the environment to be present during testing. Manual mock creation, however, can be extremely time consuming and error-prone. Moreover, the generated mocks can typically only be used in the context of the specific tests for which they were created. To address these issues, we propose MOKA, a general framework for collecting and generating reusable test mocks in an automated way. MOKA leverages the ability to observe a large number of interactions between an application and its environment and uses an iterative approach to generate two possible, alternative types of mocks with different reusability characteristics: advanced mocks generated through program synthesis (ideally) and basic record-replay-based mocks (as a fallback solution). In this paper, we describe the new ideas behind MOKA, its main characteristics, a preliminary empirical study, and a set of possible applications that could benefit from our framework.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot5891,
  title = {A framework for automated test mocking of mobile apps},
  author = {Mattia Fazzini and Alessandra Gorla and Alessandro Orso},
  booktitle = {ASE},
  year = {2020},
  doi = {10.1145/3324884.3418927}
}