Run jacocoTestReport
task to generate JaCoCo coverage.
You will see output similar to this:
> Task :app:jacocoTestReport
[ant:jacocoReport] Classes in bundle 'app' do not match with execution data. For report generation the same class files must be used as at runtime.
[ant:jacocoReport] Execution data for class com/example/jacocohiltentrypointcoveragetestapp/MainFragment does not match.
[ant:jacocoReport] Execution data for class com/example/jacocohiltentrypointcoveragetestapp/MainActivity does not match.
Current issues:
- On
master
branch, open up the generated html JaCoCo report. You will see thatMainFragment
has no coverage. Onlifted-workaround
you will see that by adding theMainFragmentLifted
class, JaCoCO coverage forMainFragment
is reported. (See https://issuetracker.google.com/issues/161300933)