Copy Data from an Android Emulator that is run by Gradle Managed Devices
Asked Answered
L

1

6

When running UITests on an Android Emulator that is managed using Gradle managed devices, how do I copy data like screenshots, cucumber reports etc.? I cannot use adb pull because the emulator is shutdown and reset instantly after each run.

Lys answered 14/10, 2022 at 12:34 Comment(0)
L
8

There is a little documented feature to do this:

Everything that you copy on the emulator to

/sdcard/Android/media/<Bundle Identifier>/additional_test_output

is copied to a per-managed-device subfolder in

app/build/outputs/managed_device_android_test_additional_output

after the test has been run.

Lys answered 14/10, 2022 at 12:34 Comment(3)
This is correct, maybe it would be a good idea to mark this answer as correct! :)Dit
Worth adding that the <Bundle Identifier> needs to match the "namespace" parameter defined within the "android" block inside benchmark module's build.gradle(.kts) file.Winnow
Not that "<Bundle Identifier>" should match the "applicationId" which might be different from "namespace"Jesusitajet

© 2022 - 2024 — McMap. All rights reserved.