一句话:提出 WeReplay,用深度学习推断 GUI 渲染状态、动态调整回放事件间隔,在微信上兼顾回放效率与有效性。
录制回放(record-and-replay)工具是保证微信这类亿级用户应用质量的关键手段,但回放事件之间等待时间的设置长期被忽视:等待过长会在已完整渲染的界面上浪费时间、拖慢回放,等待过短则会让事件落在仅部分渲染的界面上、损害回放有效性,理想方案需要在两者间取得平衡。本文提出 WeReplay,一种轻量的、基于图像的方法,依据 GUI 渲染状态动态调整事件间的时间间隔。它在 GUI 实时画面流上使用深度学习模型推断当前渲染状态,并与回放工具同步,只有当 GUI 完整渲染时才调度下一个事件。评估表明,该模型在微信中判别 GUI 渲染状态的精确率为 92.1%、召回率为 93.3%;在 23 个常见微信使用场景上,WeReplay 在相同设备与不同设备上都能全部成功回放,且效率优于当前实践中的基线方法。
WeChat, a widely-used messenger app boasting over 1 billion monthly active users, requires effective app quality assurance for its complex features. Record-and-replay tools are crucial in achieving this goal. Despite the extensive development of these tools, the impact of waiting time between replay events has been largely overlooked. On one hand, a long waiting time for executing replay events on fully-rendered GUIs slows down the process. On the other hand, a short waiting time can lead to events executing on partially-rendered GUIs, negatively affecting replay effectiveness. An optimal waiting time should strike a balance between effectiveness and efficiency. We introduce WeReplay, a lightweight image-based approach that dynamically adjusts inter-event time based on the GUI rendering state. Given the real-time streaming on the GUI, WeReplay employs a deep learning model to infer the rendering state and synchronize with the replaying tool, scheduling the next event when the GUI is fully rendered. Our evaluation shows that our model achieves 92.1% precision and 93.3% recall in discerning GUI rendering states in the WeChat app. Through assessing the performance in replaying 23 common WeChat usage scenarios, WeReplay successfully replays all scenarios on the same and different devices more efficiently than the state-of-the-practice baselines.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2308-06657,
title = {Towards Efficient Record and Replay: A Case Study in WeChat},
author = {Sidong Feng and Haochuan Lu and Ting Xiong and Yuetang Deng and Chunyang Chen},
booktitle = {FSE},
year = {2023},
doi = {10.1145/3611643.3613880}
}