UI tests on Android Emulator API 33 start but do not finish

3 days ago 2
ARTICLE AD BOX

After upgrading the Android emulator from API 31 to API 33, we’ve encountered an issue where some automated UI tests do not complete their execution. We have two separate projects—located in neighboring directories, each with its own distinct APK. Both projects use an identical automation setup and test launch process. On one project, all tests start and finish successfully. However, in the other project, tests do start, but do not reach the end: the process is interrupted midway, with no errors or crashes appearing in the logs. The tests simply stop progressing and never complete. This problem only appeared after switching to API 33; on API 31, both projects’ tests ran to completion without issues.
We are using the following instrumentation libraries and tools in our test setup:

Android Test Orchestrator: 1.4.2 (orchestrator-1.4.2.apk)

Android Test Services: 1.4.2 (test-services-1.4.2.apk)

Allure commandline: 2.30.0 (installed from the official zip distribution)

And this IMAGE

ENV EMULATOR_IMAGE="system-images;android-$SDK_VERSION;google_apis;x86_64"

It is important to note that if we use the following emulator image instead:

ENV EMULATOR_IMAGE="system-images;android-$SDK_VERSION;google_atd;x86_64"

— the tests do complete successfully. The issue with tests not finishing only occurs when using the standard Google APIs image (system-images;android-33;google_apis;x86_64). This difference in behavior is 100% reproducible across runs and projects with otherwise identical configuration and dependencies.
Similarly, if we increase the emulator API level to 34 (for example, using system-images;android-34;google_apis;x86_64), the result is the same: the tests start but do not complete. This issue persists with both API 33 and API 34 images.

Read Entire Article