一句话:提出 MAPIT,在闭源姐妹 Android/iOS 应用间双向迁移含 oracle 的 UI 测试,无需源码。
手工编写 UI 测试成本高昂。已有移动应用测试迁移方法依赖同平台同领域应用间的相似性,或仅支持从开源 iOS 应用到其 Android 实现的单向迁移,且需要源码。本文提出 MAPIT,支持闭源“姐妹”Android/iOS 应用之间的双向 UI 测试迁移,并能迁移含 oracle 的测试。MAPIT 先在源应用上运行已有测试,为每个测试构建部分应用模型,包括截图、截图内元素的可获取属性以及带标签的界面迁移;随后利用计算机视觉与 NLP 在目标应用上定位对应信息,生成等价测试。作者在多个广泛使用、闭源的姐妹 Android 与 iOS 应用上评估,表明 MAPIT 可行、准确且有用。
Writing UI tests manually requires significant effort. Several approaches have tried to address this problem in mobile apps: by exploiting the similarities of different apps within the same domain on a single platform, they have shown that it is possible to transfer tests that exercise similar functionality between the apps. A related recent technique enables transfer of UI tests uni-directionally, from an open-source iOS app to the same app implemented for Android. This paper presents MAPIT, a technique that expands existing work in three important ways: (1) it enables bi-directional UI test transfer between pairs of "sibling" Android and iOS apps; (2) it does not assume that the apps’ source code is available; (3) it is capable of transferring tests containing oracles in addition to UI events. MAPIT runs existing tests on a "source" app and builds a partial model of the app corresponding to each test. The model comprises the app’s screenshots, obtainable properties of each screenshot’s constituent elements, and labeled transitions between the screenshots. MAPIT uses this model to determine the corresponding information on the "target" app and generates an equivalent test, via a novel approach that leverages computer vision and NLP. Our evaluation on a diverse set of widely used, closed-source sibling Android and iOS apps shows that MAPIT is feasible, accurate, and useful in transferring UI tests across platforms.
DOI 原文 ·
@inproceedings{paperbot6627,
title = {UI Test Migration Across Mobile Platforms},
author = {Saghar Talebipour and Yixue Zhao and Luka Dojcilovic and Chenggang Li and Nenad Medvidovic},
booktitle = {ASE},
year = {2021},
doi = {10.1109/ase51524.2021.9678643}
}