Hello everyone!
During the contribution phase for Create Android Tests for ODK-X’s Android tools(Outreachy Winter 2024), we had discussions about JaCoCo test coverage not being integrated into some of the Android tools projects and I, (and maybe some others) am looking forward to adding that support.
But! You know what I found! It’s actually there already we’re just missing the gradle-config! And, to generate the coverage report, you should run ./gradlew createSnapshotDebugUnitTestCoverageReport
In summary, when working to write tests for odk tools, to have access to the test coverage report by JaCoCo, make sure to clone the gradle-config into the parent folder of the project and ensure a successful build. Write your tests and generate test coverage reports with ./gradlew createSnapshotDebugUnitTestCoverageReport
.
Happy contributing