No JaCoCo Coverage

Good morning, I am using AzureDevops, Kotlin, and JaCoCo in attempts to get code coverage calculations in SonarCloud.

The JaCoCo plugin is correctly implemented in our gradle files as evidenced by the production of xml test results reports in the build server (Azure Build Agent)

In the ‘Run Code Analysis’ Sonar step I see the logs stating that 32 reports were imported yet the code coverage still says 0%.

What am I missing?

AzureDevops Logs:

INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 32 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=31ms

Build Server Listing:

app/build/test-results/testQaDebugUnitTest:

TEST-com.ypo.connect.flows.appstart.splash.SplashViewModelTest.xml
TEST-com.ypo.connect.flows.auth.forgotpassword.codedelivery.CodeDeliveryViewModelTest.xml
TEST-com.ypo.connect.flows.auth.forgotpassword.codeverification.CodeVerificationViewModelTest.xml
TEST-com.ypo.connect.flows.auth.forgotpassword.passwordchange.PasswordChangeViewModelTest.xml
TEST-com.ypo.connect.flows.auth.forgotpassword.verifyemail.VerifyEmailViewModelTest.xml
TEST-com.ypo.connect.flows.auth.forgotusername.usernamerecovery.UsernameRecoveryViewModelTest.xml
TEST-com.ypo.connect.flows.auth.forgotusername.usernamerecoverysuccess.UsernameRecoverySuccessViewModelTest.xml
TEST-com.ypo.connect.flows.auth.resetmain.ResetMainViewModelTest.xml
TEST-com.ypo.connect.flows.auth.verifyinfo.VerifyInfoViewModelTest.xml
TEST-com.ypo.connect.flows.chapters.ChapterMainViewModelTest.xml
TEST-com.ypo.connect.flows.chapters.selection.CommunitySelectionViewModelTest.xml
TEST-com.ypo.connect.flows.communities.CommunitiesViewModelTest.xml
TEST-com.ypo.connect.flows.communities.forumdirectory.ForumDirectoryViewModelTest.xml
TEST-com.ypo.connect.flows.forum.agenda.deeperdive.ownagenda.OwnAgendaViewModelTest.xml
TEST-com.ypo.connect.flows.forum.agenda.deeperdive.presentation.PresentationViewModelTest.xml
TEST-com.ypo.connect.flows.forum.attendancetracker.AttendanceTrackerViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meeting.NewMeetingViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meetinginfo.meetingdetails.MeetingDetailsViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meetinginfo.notes.NotesViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meetinginfo.parkinglot.ParkingLotViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meetinginfo.parkinglot.create.ParkingLotCreateViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meetinginfo.parkinglot.members.MemberViewModelTest.xml
TEST-com.ypo.connect.flows.forum.meetinginfo.summary.SummaryViewModelTest.xml
TEST-com.ypo.connect.flows.forum.mymeetings.MyMeetingsViewModelTest.xml
TEST-com.ypo.connect.flows.forum.quicklink.supportcenter.SupportCenterViewModelTest.xml
TEST-com.ypo.connect.flows.forum.retreatagenda.RetreatAgendaViewModelTest.xml
TEST-com.ypo.connect.flows.forum.retreatagenda.addagenda.AddAgendaViewModelTest.xml
TEST-com.ypo.connect.flows.forum.retreatagenda.addbreak.AddBreakViewModelTest.xml
TEST-com.ypo.connect.flows.forum.startmeeting.timer.TimerViewModelTest.xml
TEST-com.ypo.connect.flows.forum.toolkit.filter.FilterViewModelTest.xml
TEST-com.ypo.connect.flows.forum.toolkit.forumdetails.ForumToolkitViewModelTest.xml
TEST-com.ypo.connect.flows.forum.toolkit.subtype.ToolkitSubTypeViewModelTest.xml

Also, some configuration, done in AzreDevops ‘Prepare Analysis’ step

sonar.exclusions=/*.bin
sonar.exclusions=
/.java
sonar.sources=app/src/main
sonar.coverage.jacoco.xmlReportPaths=app/build/test-results/testQaReleaseUnitTest/
.xml

Hi @barger2018 amd welcome to the community!

Could you please share a reproducer with us and your gradle.build file.

It is also important to check the generated jacoco report and warnings during report (if have ones). Also make sure your Kotlin source files are placed in the right directory (according to the package), otherwise JaCoCo is unable to locate source files and it will affect shown results.

Regards,
Margarita