mutmut
mutmut copied to clipboard
[QUESTION] Option to Only Show Files with Surviving Mutants In HTML Report
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?
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 :)
@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.
I strongly recommend you use the mutmut commands instead. Much faster.
@boxed Could you provide the commands for my specific usecase? I'll try them out and let you know my thoughts as well. 🙂
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.
@boxed
I can't find any docs for mutmut status
. Does this only show surviving mutants?
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.