stryker-mutator / sonar-stryker-plugin

A plugin to report stryker results to Sonar
Apache License 2.0
11 stars 6 forks source link

Report Mutation Percentage Coverage Measure #5

Open j-truax opened 7 years ago

j-truax commented 7 years ago

Was able to verify that the plugin captured survived & not covered mutants in our Sonar DB and were viewable on the project dashboard.

Currently the above metrics are reported as issues. However, it would be nice if this plugin also stored a Coverage Measure that captured Mutation Coverage % similar to Line & Condition.

@nicojs @simondel - Any thoughts on whether this could be supported?

nicojs commented 7 years ago

Great to hear that the plugin is working for you! I agree that we need the metric. Let's call it "Mutation Score" as that is what we've been calling it so far.

This is rather easily implemented. We now report the mutation score in the onScoreCalculated event here: https://github.com/stryker-mutator/stryker/blob/master/packages/stryker-api/src/report/Reporter.ts#L45. It is written to disk by the event-recorder reporter so that part is already done. All that's left is to read in that file as well and report the metrics you want reporting.

@j-truax You're welcome to help. Do you want to implement this?

j-truax commented 7 years ago

@nicojs - I wouldn't mind contributing but my bandwidth is a limited right as I am working full time and getting my MBA. My work requires me to get approval prior to contributing to open source projects. At the very least I will try and set aside some time to review the source and see what enhancement is needed for this.

jmpresso commented 7 years ago

I chatted with @j-truax about this. I'll give it a shot- may take me a bit.

Edit- I didn't have much time and never did this. IIRC, once I did start to pick it up, I found report format changes had broken this plugin entirely, which seemed to be a larger fix.