Skip to content
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

feat: single file HTML report #2540

Merged
merged 6 commits into from
Dec 21, 2020
Merged

Conversation

bartekleon
Copy link
Member

@bartekleon bartekleon commented Oct 7, 2020

Output the index.html file without the need for external resources. This will make using it in CI/CD pipelines.

With this, you can simply open the index.html file in your browser, without first needing to extract all files to a directory. This will also make Stryker compatible with the azure-devops-mutationreport-publisher.

If you were relying on the reports/mutation/html/bind-mutation-test-report.js file containing the report JSON, please migrate to the new JSON reporter: https://stryker-mutator.io/docs/stryker/configuration#reporters-string

fixes: #2188

@bartekleon
Copy link
Member Author

bartekleon commented Oct 7, 2020

adds single file report alongside existing one. I guess it should be tested(?), but still for now it's only proof of concept (image is still standalone file tho! :P [but honestly who cares about image if it doesn't load ;x])

@nicojs
Copy link
Member

nicojs commented Oct 9, 2020

An image can be added with a data-url. Or we can use our new svg: https://stryker-mutator.io/images/stryker.svg

Copy link
Member

@nicojs nicojs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up!

@nicojs
Copy link
Member

nicojs commented Oct 13, 2020

I'm actually thinking that we should add this with a configuration option. For big projects, it's kind of a waste to have 2 reports for each run, since file size can rise significantly.

@simondel what is your take on this?

  1. Make it configurable?
  2. If so. what will the default be? What will the configuration option name be? htmlReporter.singleFile?
  3. If not: force both? Or only 1?

@bartekleon
Copy link
Member Author

In any case, unfortunatelly I have very little time during next two weeks or so. Mostly university stuff + personal problems, so if you could carry on this issue from this point :)

@HonzaMac
Copy link

I would prefer to have only one index.html with all-in-one.

@nicojs
Copy link
Member

nicojs commented Dec 21, 2020

@kmdrGroch I'm finishing this one. Want to get it in the 4.3 release 😍

@nicojs nicojs merged commit 057f9fd into stryker-mutator:master Dec 21, 2020
@bartekleon bartekleon deleted the singleFileHTML branch December 22, 2020 13:28
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.

HTML Report in one single file
3 participants