Hi guys,

I am investigating code-coverage for our Android app. built with Gradle and 
Android Studio.

I need code-coverage reports in two situations: during manual tests, and during 
automated tests built with our Appium suite.

I need to get a proof-of-concept that JaCoCo can indeed do code coverage in 
this case. 

Given that we need coverage for Appium and manual tests, I believe 
offline-instrumentation with JaCoCo is what I need.

I have succeeded in creating an instrumented APK. 
But when I run the app manually, I keep seeing errors in the logcat 
W/System.err: java.io.FileNotFoundException: /jacoco.exec: open failed: EROFS 
(Read-only file system)

>From JaCoCo docs as well as general Googling, I understand that Jacoco needs 
>to know where to store the jacoco.exec file - and that I need to package a 
>jacoco-agent.properties (containing a destfile property) with the APK.

I have tried putting jacoco-agent.properties in the "assets" folder of my app - 
it was packaged into the APK properly, but did not seem to have any effect (i.e 
Jacoco failed as usual) I tried putting it inside res - it did not get packaged 
into the APK. I tried res/raw and hit the error about a dash in the filename.

I am at my wit's end, and would really appreciate help. How do I package 
jacoco-agent.properties using my Gradle build into the APK, so that JaCoCo will 
read it?

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/51d07502-cd28-4516-affa-633d0ba65275%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to