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

[QUESTION] Option to Only Show Files with Surviving Mutants In HTML Report #214

Open
FloatingSunfish opened this issue Jul 1, 2021 · 7 comments

Comments

@FloatingSunfish
Copy link

FloatingSunfish commented Jul 1, 2021

I can generate an HTML report that contains mutmut's results with mutmut html.

However, it also shows files where surviving mutants are 0.
Is there a flag I can use so the report will only contain files where surviving mutants are > 0?

@boxed
Copy link
Owner

boxed commented Jul 3, 2021

What do you want the html report for?

Personally I have always thought the report is totally useless so with or without your suggestion it'd still be useless to me so I guess I need more information :)

@FloatingSunfish
Copy link
Author

FloatingSunfish commented Jul 3, 2021

@boxed
I use the report to check each file with surviving mutants one by one (I click on the files to open them in their own tab) and look at what mutants survived.

I do the same thing for Python's coverage HTML report. Check what files don't have 100% coverage, open each file on their own tab, and see what I need to cover.
coverage has a helpful flag to exclude files already covered at 100% from the HTML report so I only see files that I need to work on.

@boxed
Copy link
Owner

boxed commented Jul 3, 2021

I strongly recommend you use the mutmut commands instead. Much faster.

@FloatingSunfish
Copy link
Author

FloatingSunfish commented Jul 4, 2021

@boxed
Could you provide the commands for my specific usecase?
I'll try them out and let you know my thoughts as well. 🙂

@boxed
Copy link
Owner

boxed commented Jul 4, 2021

mutmut status to get the list of mutants. You can also do mutmut status <file> to get mutant ids for a specific file. Then mutmut show <id> to show a mutants diff.

@FloatingSunfish
Copy link
Author

FloatingSunfish commented Jul 4, 2021

@boxed
I can't find any docs for mutmut status. Does this only show surviving mutants?

@DudeNr33
Copy link
Collaborator

As mutation testing can take a lot of time, those tests might be run on a CI server.
Having an HTML report as an artefact that can be viewed as result (e.g. in Jenkins you can easily grab any HTML produced during the run and link it on the job's page) can be beneficial, even more so if the report is as slim as possible.

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

No branches or pull requests

3 participants