Collect code coverage during virtual Android device testing

codecov
android

#1

Description of the feature request

Collect code coverage during virtual Android device testing. Make it available to a following script step.

Use case / for what or how I would use it

I would merge device test code coverage statistics with unit test statistics and send the result slack.


#2

Hi @markus.kallander

Thanks for the #feature-request!

Could you please clarify this a bit? Is the issue that there’s absolutely no code coverage report, or just that it’s not exposed?

For generating code coverage reports I found this: https://stackoverflow.com/questions/40726208/how-to-get-code-coverage-reports-from-google-firebase-for-android-espresso-tests


#3

right now there is no way to create a test coverage report for the tests running in the android virtual device step.
While we are able to do that for our unit tests by having a Gradle Runner step to execute the coverage report, we cannot do the same for the instrumentation tests as the gradle task you are running is not editable. createDevDebugCoverageReport could be a potential gradle task to run in case we want to both run the instrumentation tests and create the test coverage report for them


#4

So to be clear @viktorbenei I am using the BETA version of Android device testing step and my question is how I can enable jacoco test reports. The SO solution you posted assumes that we are having full control over the Firebase test labs, which is not the case as far as i understand when we use Bitrise’s step


#5

Hy there!

We created a card for the tooling team to find a way to collect code coverage reports from firebase as a default.
If the enchantment is done, we will post it here.