Automating iOS 8 app with Appium causes app freeze

2019-05-23 16:47发布

问题:

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.

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

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.

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

回答1:

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.

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



回答2:

There is way to restart Appium Server during runtime , which helped us to overcome freezing issue:

Please have a look at my blog for more details:

http://www.qaautomationsimplified.com/android/restarting-appium-server-improve-various-server-freezing-issues-may-improve-execution-time/