stryker-mutator / stryker-dashboard

See your mutation testing reports from anywhere 🚀
https://dashboard.stryker-mutator.io/
Apache License 2.0
23 stars 18 forks source link

Mutants count as a badge #382

Open antoinezanardi opened 1 year ago

antoinezanardi commented 1 year ago

Is your feature request related to a problem? Please describe.

I love the idea of the Mutation Score from the dashboard. I would like the same feature but with the number of mutants executed. The same number as the one in the All Files line, in column Total in the coverage HTML report.

Describe the solution you'd like

I would like to get a badge for the number of mutants executed from the dashboard, like the mutation score.

Additional context

image

The number should be the one on the very right of this screenshot from the coverage HTML report.

Thanks again for your hard work, I use stryker on a daily basis and I really love this tool.

nicojs commented 1 year ago

Thanks for your kind words 🥰

Why would this be useful? I mean, it says more about the size of your project than anything else. Like lines of code.

antoinezanardi commented 1 year ago

You're welcome !

Indeed, it says mostly about the project's size. It's actually a good metric because there's a difference between 100% mutation score based on 10 mutants than 2000.

jest offers some metrics like : statements, functions, modules to quantify the test coverage other than the percent.

Do you think this is possible for mutants count ?

nicojs commented 1 year ago

That sounds like a great feature. I've moved it to "stryker-dashboard", the mono repo for dashboard-related stuff.

Would something like this work for you?

rouke-broersma commented 1 year ago

antoinezanardi commented 1 year ago

I like this format :

840/1200 mutants | 70%

What do you think ?

nicojs commented 1 year ago

Sure. If you feel up to it you can add it yourself @antoinezanardi

See https://github.com/stryker-mutator/stryker-dashboard/tree/master/packages/badge-api

antoinezanardi commented 1 year ago

I'll give it a try soon