一句话:提出设备端 Android GUI 测试生成器 DD-2,在设备上借无障碍服务生成交互,较跨设备方案快 3.2 倍。
在 Android 应用的 GUI 测试中,常见做法是由独立测试计算机生成交互,再发送到真实 Android 设备执行。虽然应用与交互本身执行很快,但测试计算机与设备之间的通信开销严重拖慢整体测试速度。本文提出 DD-2:一种直接在设备上运行的 Android GUI 测试生成器,它利用 Android 无障碍服务观察并操作待测应用,从而在设备本地完成交互生成与执行。DD-2 与其“计算机–设备”对照版本共享同一份源代码,便于公平比较。实验表明,DD-2 比对照方案快 3.2 倍,说明将测试生成下沉到设备端可有效消除通信瓶颈并加速 GUI 测试。
When generating GUI tests for Android apps, it typically is a separate test computer that generates interactions, which are then executed on an actual Android device. While this approach is efficient in the sense that apps and interactions execute quickly, the communication overhead between test computer and device slows down testing considerably. In this work, we present DD-2, a test generator for Android that tests other apps on the device using Android accessibility services. In our experiments, DD-2 has shown to be 3.2 times faster than its computer-device counterpart, while sharing the same source code.