[NEW RELEASE] MuleSoft Coverage 0.5.1

Hi SonarSource,

Ultimate Software has open source our SonarQube plugin for reporting coverage from MuleSoft test run reports. We would like to request it be added to the Marketplace.

Thank you!

Hi,

Welcome to the community!

I’ve requested changes on your PR. In addition, when testing with the project you provided, I got 0 coverage.

That lead me to look at your coverage report:

{
  "coverage": 58.54,
  "requiredApplicationCoverage": -1.0,
  "requiredResourceCoverage": -1.0,
...

I find myself a little troubled by what appears to be an overall coverage number. Once the report is correctly read, how do you expect that to be used in SonarQube?

 
Ann

Hi Ann,

Thank you for the detailed reply. I have updated the PR, but I am scratching my head as well, attached is a screenshot of what I see when I run scan the project.

We use the plugin for our quality gate on Mulesoft workflows internally.

I have tried to reproduce your output, however the only way I have found that I can do so is to remove the plugin configurations or set them incorrectly. The two configs are sonar.coverage.mulesoft.xmlSourcePaths=./src and
sonar.coverage.mulesoft.jsonReportPaths=./report/munit-coverage.json.

Okay, this was my fault. It’s what comes of not cleaning out my test server between tests; I had a lingering coverage exclusion (**) from a previous test. Sorry 'bout that.

So now I see 58.5% coverage. And when I copy some random source files from another language into my mulesoft test project, I see a correct-looking aggregate coverage value.

So… you’re in!

 
:smiley:
Ann

1 Like

That’s terrific, thank you so much! :joy: On average, how long does it take to show up in the marketplace?

Hi,

The job that generates the metadata is a long one, and I didn’t wait for it to complete to reply, but it’s not that long. I see the plugin in the Plugin Version Matrix now…

 
Ann