New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Reporter #1814
Comments
I'm working on this one already as part of our innovation day here in DAZN and as one of my personal objectives. This idea was discussed a while ago here. stryker-mutator/stryker-handbook#25 |
Hi there! Just an update and a couple of questions! I have the draft of the json-reporter here. https://github.com/dance-cmdr/stryker/tree/json-reporter It is a very simple implementation so far. The only thing it does so far is stringifying The solution is modelled after the html-reporter so it will be very familiar to you. I'm running the tests in the package and everything seems fine. However, when I run npm run all, the script fails with the following...
What I'm doing wrong? My second question is. I want to tests the json-reporter on a real project. How do you recommend approaching this? I do not understand how to npm link a lerna package. |
Hi @dance-cmdr 👋 thanks for picking this one up ❤
Great, this is exactly what it should do 😅 Test on a real project: you should be able to use
You could also use a tool like install-local to do an actual production installation of a local package. As far as "what am I doing wrong", I cannot see it. You're running |
Just took a look in your branch. You've created a separate package for the reporter. While it's not wrong perse, I would like it if it was integrated in the list of reporters coming with stryker out-of-the-box. This will be easier for us to maintain as well as easier to use. You can do this by adding the reporter to this directory: https://github.com/stryker-mutator/stryker/blob/master/packages/core/src/reporters And declaring it here: https://github.com/stryker-mutator/stryker/blob/master/packages/core/src/reporters/index.ts |
Thanks @nicojs! I'll move json-reporter into the out-of-the-box reporters. That will probably solve most of my problems with the tests. The problem I have is that the tests pass when I run them from within the package, but, the whole collection would fail when I run it fro the root with test:all |
@dance-cmdr are you still working on this issue? Totally fine if you have other priorities now |
Hi @nicojs! |
Is your feature request related to a problem? Please describe.
We are making a tool that requires stryker report snapshots to express mutant rating over time. Historical mutant rating.
Describe the solution you'd like
Export a stryker report in a json file.
Describe alternatives you've considered
My first take was to use the data from the html-reporter but it was embedding the data in a file and it wasn't nice to take them out.
The text was updated successfully, but these errors were encountered: