Environment Variables are not getting passed to virtual device test lab

I am trying to pass environment variables to your virtual device testing for android step.
https://github.com/bitrise-steplib/steps-virtual-device-testing-for-android.

I know its in beta but you suggest options that don’t work. I have tried using the suggested values.

coverage=true
coverageFile="/sdcard/coverage.ec"

A coverage file is never created and it looks like it isn’t respecting the variables. I have tried setting the same vars with gcloud command line to run through firebase test lab and that is working.

Hi @geoffpowell-vividsea,

Can you please share the command you tried?

In general you have to enable Writing to SD Card to make code coverage reporting work with Firebase Test Lab, see: How to get code coverage reports from google Firebase for Android Espresso tests - Stack Overflow

Also, don’t forget to set the Directories to pull option of the step to the sdcard (e.g. /sdcard or /sdcard/tempDir1 - as you can see in the description of this input).

If you’d have any questions just let us know! :slight_smile:

So we have a script that runs gcloud command. It is running this successfully:

gcloud firebase test android run --app=../app-uitest-debug.apk, --test=../app-uitest-debug-androidTest.apk --device model=Nexus5X,version=23,locale=en,orientation=portrait --type=instrumentation --environment-variables suite="integration",coverage=true,coverageFile="/sdcard/coverage.ec" --directories-to-pull=/sdcard --results-dir=build-123/

Our test apk and app apk already have WRITE_EXTERNAL permissions and the testCoverageEnabled flag in our gradle config for debug builds.

We also have the Directories to Pull set because it is pulling our other test files just not the code coverage file we expect to be there.

Here is what we have set:

@geoffpowell-vividsea can you please copy paste the related build’s Bitrise.io URL here? We’ll look into it ASAP!

Here is the build that is not working. Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation

I highlighted my variables that it makes it seem like its passing but the instrumentation test don’t run correctly.