Why is the teardown phase taking significantly longer on iOS compared to Android when running tests with Appium on AWS Device Farm?

0

I’m running automated tests using Appium Java with TestNG on AWS Device Farm for both Android and iOS platforms. While the execution time of the test steps is comparable between platforms, I have noticed that the teardown phase on iOS takes significantly longer.

  • On Android teardown phase takes around 30 seconds
  • On iOS teardown phase takas around 6 minutes
asked 23 days ago51 views
1 Answer
0

The significant difference in teardown time between iOS and Android when running Appium tests on AWS Device Farm can be attributed to several factors:

  1. Default settings: Device Farm applies default settings for Appium tests, which may not be optimized for your specific use case. These default settings can lead to slower performance, especially on iOS devices.

  2. WebDriverAgent: iOS tests using Appium rely on WebDriverAgent, which needs to be built and installed on the device. This process can contribute to longer teardown times.

  3. Granular reporting: Device Farm's standard environment provides detailed reporting for each test case, including performance data, videos, screenshots, and logs. This comprehensive reporting can lead to longer execution times, including during the teardown phase.

  4. iOS-specific complexities: iOS devices generally have more stringent security measures and a more complex architecture, which can result in longer times for cleanup and resource release during teardown.

To address this issue and potentially reduce the teardown time for iOS tests, you could try the following:

  1. Use custom test environments: Custom environments allow you to specify commands for test execution, which can lead to faster execution times compared to the standard environment.

  2. Adjust Appium capabilities: Fine-tune the Appium server parameters by adjusting capabilities in your test spec. For example, setting "usePrebuiltWDA" to true can speed up the initial start time for iOS tests.

  3. Optimize test suite: Review your test suite for any iOS-specific operations that might be contributing to the longer teardown time and see if they can be optimized or removed if unnecessary.

  4. Consider unmetered devices: If available, using unmetered devices for your iOS tests might provide more consistent performance and potentially faster teardown times.

By implementing these strategies, you may be able to reduce the discrepancy in teardown times between iOS and Android platforms when running Appium tests on AWS Device Farm.
Sources
Speeding up Appium-based tests in Device Farm through desired capabilities - AWS Device Farm
Test environments in AWS Device Farm - AWS Device Farm
Web app tests in AWS Device Farm - AWS Device Farm

profile picture
answered 23 days ago
AWS
SUPPORT ENGINEER
reviewed 19 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions