allure-framework / allure-kotlin

Allure integrations for test frameworks targeting Kotlin and Java with 1.6 source compatibility.
Apache License 2.0
57 stars 21 forks source link

Support tests running on an Android Emulator that is managed via Gradle Managed Devices #79

Open jaysirju opened 1 year ago

jaysirju commented 1 year ago

I'm submitting a ...

What is the current behavior?

Allure results are written to /sdcard/googletest/test_outputfiles/allure-results or by default when running on a device.

What is the motivation / use case for changing the behavior?

If the device is managed via Gradle Managed Devices, you cannot use 'adb pull' to get the contents of the sd-card. However, there is a little known feature that the contents of the /sdcard/Android/media/<Bundle Identifier>/additional_test_output directory is copied over to app/build/outputs/managed_device_android_test_additional_output after the tests have been executed.

Details can be found here

kadestro commented 9 months ago

you can use additionalTestOutputDir to change the directory from which the test results will be taken, e.g.:

testInstrumentationRunnerArguments["additionalTestOutputDir"] = "/sdcard/googletest"