Closed omuomugin closed 2 years ago
Hi @omuomugin! Sorry for the delay on your report, but thanks for raising it.
The issue is known as you suspected but the solution is not implemented yet unfortunately. We'll do our best to communicate the request and raise the priority of the problem as much as we can.
@bitce I got that π Waiting for the issue to be fixed! or is there anything that I can do as an individual developer? I mean if the missing implementation is clear, maybe I can try fixing this ?
Thanks
Hello there @omuomugin π
Thank you for offering to help, it is very much appreciated. Unfortunately the developers have a lot on their hands meaning sometimes they need to prioritise in a way that some issues are attended to at later times.
But you can fork the step and create a Pull Request with a proposed solution, which is very welcome, as it would speed up the process of implementing a fix, so a win-win for everyone π
Hello there, any update on this issue?
Hello @carloswabreu1 π
I checked in with the developers to see the status of this task, and there are still discussions on how to best approach this, but the process will take more time than expected. As soon as there is an update, we'll let you know! π
Thanks for the swift reply, @Roland-Bak. It's my understanding that this is a critical missing piece if we want to report test coverage coming from instrumented tests. Is there any other way we could be using e.g. the Sonarqube step to report test coverage that doesn't need this fix?
For those having this problem, please check if the logcat file downloaded from the test device contains an error like this:
06-25 02:14:42.416: E/CoverageListener(20344): Failed to generate Emma/JaCoCo coverage.
06-25 02:14:42.416: E/CoverageListener(20344): java.lang.reflect.InvocationTargetException
06-25 02:14:42.416: E/CoverageListener(20344): at java.lang.reflect.Method.invoke(Native Method)
06-25 02:14:42.416: E/CoverageListener(20344): at androidx.test.internal.runner.listener.CoverageListener.generateCoverageReport(CoverageListener.java:101)
06-25 02:14:42.416: E/CoverageListener(20344): at androidx.test.internal.runner.listener.CoverageListener.instrumentationRunFinished(CoverageListener.java:70)
06-25 02:14:42.416: E/CoverageListener(20344): at androidx.test.internal.runner.TestExecutor.reportRunEnded(TestExecutor.java:92)
06-25 02:14:42.416: E/CoverageListener(20344): at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:65)
06-25 02:14:42.416: E/CoverageListener(20344): at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:395)
06-25 02:14:42.416: E/CoverageListener(20344): at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145)
06-25 02:14:42.416: E/CoverageListener(20344): Caused by: java.io.FileNotFoundException: /sdcard/coverage.ec (Permission denied)
06-25 02:14:42.416: E/CoverageListener(20344): at java.io.FileOutputStream.open0(Native Method)
06-25 02:14:42.416: E/CoverageListener(20344): at java.io.FileOutputStream.open(FileOutputStream.java:308)
06-25 02:14:42.416: E/CoverageListener(20344): at java.io.FileOutputStream.<init>(FileOutputStream.java:238)
06-25 02:14:42.416: E/CoverageListener(20344): at com.vladium.emma.rt.RT.dumpCoverageData(RT.java:50)
06-25 02:14:42.416: E/CoverageListener(20344): ... 7 more
It's a common issue in my experience, the permission denied error means that the test application doesn't have permission to write to the sdcard
folder. This Stackoverflow question has some solutions for granting that permission during the tests.
You might also run into problems with granting android.permission.WRITE_EXTERNAL_STORAGE
because of the scoped storage enforcement in recent Android releases. Check this issue for a possible solution.
Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.
To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 90 days, so I marked it as stale.
The community would appreciate if you could check if the issue still persists. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".
If no comment left within 21 days, this issue will be closed.
I'll close this issue as it doesn't seem to be relevant anymore. We believe an old issue probably has a bunch of context that's no longer relevant, therefore, if the problem still persists, please open a new issue.
Troubleshooting
Useful information
Issue description
I need exec file from the android testing result but it turned out that no
*.exec
or*.ec
file were included in$VDTESTING_DOWNLOADED_FILES_DIR
directory.According to the instruction guide from Firebase Test Lab it should generate
artifacts/coverage.ec
for coverage report with this commandsee also https://firebase.google.com/docs/test-lab/android/command-line#code_coverage_reports_for_instrumentation_tests
as I read this discussion https://discuss.bitrise.io/t/collect-code-coverage-during-virtual-android-device-testing/3002/12 it may be worked for some time but not now.
my config is below
when I run
I get
and no
*.exec
or*.ec
foundMy question is
*.exec
or*.ec
fileBitrise info
Steps to reproduce
[BETA] Virtual Device Testing for Android
workflow*.ec
or*.exec
file for coverage report