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.
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?
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.
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.
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…