Struggled to get the combined code coverage report with multiple project constraints? This project will help you to get the combined(test & androidTest) test case code coverage report with the help of JaCoCo Android plugin
- Get combined test case coverage of
test
&androidTest
folder. - Get the coverage report of multi-flavored, multi-moduled app.
- Exclude perticular package/folder from the coverage report.
- Define the specific folder for the coverage report.
./gradlew clean 'defineYourProjectFlavorName'CoverageReport
For example:
- ./gradlew clean devDebugCoverageReport
- ./gradlew clean qaDebugCoverageReport (dev & qa are my project flavors)
Note: I will recommend to use clean
in your command as it will clean the previous build data.