Code Coverage not visible in SonarQube for Mule REST SDK Connector (Mule 4 + JaCoCo)

Hello SonarSource Team,

I’m currently working on a MuleSoft REST SDK Connector project (Mule 4) and have successfully integrated SonarQube Community Edition for code quality checks.

The analysis works fine, but code coverage is showing 0.0%.

Here’s what I’ve tried:

  • Added the JaCoCo Maven plugin (version 0.8.12)

  • Configured sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml

  • Executed mvn clean verify sonar:sonar

  • Verified that JaCoCo report file is generated correctly

However, since this project doesn’t use JUnit or MUnit test cases (it’s a Mule REST SDK connector), JaCoCo seems to skip coverage generation.

My goal is to measure code coverage for the Mule connector flows / operations even without MUnit tests — or at least confirm if MuleSoft connectors can expose meaningful coverage data in SonarQube.

Could you please guide:

  1. Whether Mule REST SDK code coverage is supported by SonarQube or SonarCloud?

  2. If not, what’s the best practice to estimate connector coverage?

  3. Any recommended plugin or workaround for Mule projects?

Environment details:

  • Mule Runtime: 4.x

  • Java: 8/11

  • SonarQube: 9.x Community Edition

  • Build: Maven

  • OS: Windows 10

Thanks in advance for your help and guidance

Hello,

Are you using a community-supported plugin, such as GitHub - mulesoft-catalyst/mule-sonarqube-plugin: The Mule SonarQube Plugin provides the capability to do code inspecting and taking project metrics from a mule project using SonarQube., for Mule analysis?

Referring to your post, you mentioned:

SonarQube: 9.x Community Edition

However, the screenshot you provided does not appear to be from SonarQube 9.x. Could you please check the footer of your SonarQube instance and confirm the exact version you are using?

Additionally, could you check your scanner logs for any messages related to the import of coverage data? Here’s some guidance on finding those logs: How to find logs about importing code coverage - #3

Thank you!

Hello SonarQube Team,

I wanted to share an update and request further guidance based on your previous response.

I verified that my current setup is running on SonarQube Community Build v25.10.0.114319 (MQR MODE) — as shown in the attached screenshot.

I have successfully configured SonarQube with the Mule Plugin (version 1.0.6) from the MuleSoft Catalyst repository, and it is visible and active in my SonarQube interface.

After completing the setup, I tried running my Mule REST SDK Connector project (Mule 4) using:

mvn clean install -U

However, I encountered the following error:

Unresolvable build extension: Plugin com.mulesoft.munit:munit-maven-plugin:jar:2.5.0 
could not be resolved. Could not find artifact in MuleSoft public repository.

It seems the MUnit 2.5.0 plugin is not available in MuleSoft’s public repositories, which causes a dependency resolution failure during the build.
I manually installed the MUnit dependency via Maven, but the same issue persists.

At this point, SonarQube with the Mule plugin is working correctly, but I’m unable to proceed with coverage analysis because of this MUnit plugin dependency issue.

Could you please confirm:

  1. Whether the Mule SonarQube plugin supports code coverage integration (via JaCoCo or MUnit reports) in this SonarQube Community Build version.

  2. If there’s any workaround to generate or import coverage reports for Mule REST SDK connectors without direct MUnit plugin support.

Thank you for your time and support.
Please find attached screenshots showing my setup and the current issue.

Hi there,

Just a heads up: this forum may not be the best place for help with generating coverage reports for Mule projects.

  1. Mule isn’t a language natively supported by SonarQube.
  2. SonarQube generally reads and analyzes coverage reports, but doesn’t generate them itself.

For generating coverage reports, I recommend checking out the MuleSoft documentation—pay special attention to the munit-maven-plugin, which is found under com.mulesoft.munit.tools rather than com.mulesoft.munit.

If you have more questions about MUnit or its plugins, it’s best to reach out to the plugin maintainers through their official channels.

Hope this helps!