Skip to content

Conversation

@phmonte
Copy link

@phmonte phmonte commented Apr 7, 2024

Feature:

Adding mutation score to json reporter.

Description:

The markdown and html reporters have the mutation score, using the same logic, adding the mutation score to the json reporter.

@phmonte phmonte marked this pull request as draft April 7, 2024 17:25
@rouke-broersma
Copy link
Member

rouke-broersma commented Apr 7, 2024

Hi @phmonte !

Appreciate the contribution, however:

The json reporter implements the mutation report schema, and adheres to this schema. The schema does not contain a score, instead anything using the report should calculate the result at presentation time. This decision was made so that if for some reason the calculation changes (more states get added or some other reason) the json will still be valid without having to be regenerated. To make this easier libraries have been created for js/ts and scala/java that implement the algorithm. Such a library does not yet exist for dotnet but can be of there's sufficient interest. See: https://github.com/stryker-mutator/mutation-testing-elements

@phmonte
Copy link
Author

phmonte commented Apr 8, 2024

@rouke-broersma, thanks for the explanation, I'll close this PR.
I'm doing this work manually so as not to copy the markdown reporter string, I intend to create the metrics for dotnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants