使用Appium自动化iOS 8应用程序会导致应用冻结 [英] Automating iOS 8 app with Appium causes app freeze

查看:126
本文介绍了使用Appium自动化iOS 8应用程序会导致应用冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个应用程序,我们使用Appium运行自动化测试。我们可以通过Appium在设备和模拟器上启动应用程序。但是,在Appium发送2-3个tap命令后,app会挂起并冻结。冻结之后,Appium在屏幕上找不到任何其他元素。

We have an app that we run automation tests on with Appium. We can launch the app on the device and simulator through Appium. However, the app hangs and freezes after Appium sends 2-3 tap commands. After the freeze, Appium can not find any other elements on the screen.

我们研究了使用Xcode 6.0.1 Instruments编写测试脚本,但是当脚本运行时,该应用程序也会挂起。

We looked into writing a test script using Xcode 6.0.1 Instruments, but when the script is run, the app hangs as well.

应用程序在手动测试时按预期执行。当我们尝试使用Appium或Xcode的Instruments运行自动化时,它才会挂起。我们正在使用Appium v​​1.3.0-beta1和Xcode 6.0.1。

The app performs as expected when testing manually. It only hangs when we try to run automation on it either with Appium or with Xcode's Instruments. We are using Appium v1.3.0-beta1, and Xcode 6.0.1.

这似乎是与这个问题,但我们的测试设备已经在8.0.2。

This seems to be a similar issue to this question, but our test device is already on 8.0.2.

推荐答案

事实证明,对于iOS 8,记录太多数据(特别是在您记录API响应时的情况)会导致自动化期间出现竞争条件。我们能够通过禁用应用程序的记录来解决我们的自动冻结问题。

So it turns out that with iOS 8, logging too much data (particularly the case when you're logging API responses) can cause a race condition during Automation. We were able to solve our automation freezing issues by disabling logging from the app.

由于@tbao对此帖的精彩分析,发现了解决方案: https://discuss.appium.io/t/app-freezes-when-自动/ 1030/8

The solution was discovered thanks to the wonderful analysis by @tbao on this post: https://discuss.appium.io/t/app-freezes-when-automated/1030/8

这篇关于使用Appium自动化iOS 8应用程序会导致应用冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆