androidandroid-gradle-plugincucumberadbuitest

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


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.


Solution

  • 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.