-
Notifications
You must be signed in to change notification settings - Fork 250
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 about filtering uncovered lines/files #3019
Comments
Hi @bgoscinski 👋 Mutant generation is very cheap compared to running tests. You can see it for yourself. When Stryker logs "Instrumented xxx source file(s) with xxx mutants" it is done with mutant generation and mutant placing.
So, not expensive at all. In fact, Stryker needs to first instrument your code (generate and place mutants) and do a full test run without a mutant active (dry run) to determine exactly which mutant is covered and which isn't. Stryker doesnt use jests code coverage for that, it brings its own (mutant) coverage. Not covered mutants won't cause extra tests runs. |
Thanks @nicojs! Good to know :) How about filtering out not covered mutants from the report? I may not see something obvious but at least for now, for my usecase they seem to be just noise |
That sounds like a fair request. I assume you mean from the HTML report? Please file an issue at mutation-testing-elements. That is where the HTML report lives (shared between all Stryker versions and even other mutation testing frameworks). BTW you might be interested in our proposal for incremental support #2753 , please upvote so we know where to spend our time on next 😉 |
Thanks again for super fast reply! :)
Cool. On it 👍 |
First of all thank you for creating StrykerJS! It's amazing how smoothly I could integrate it with my current codebase! ❤
Question
I have a codebase with very low code coverage but want to ensure that the tests me and my teammates create are effective. Right now when I run Stryker the report looks like this:
As you can see the number of not covered mutants is very high. What I'm interested in is filtering them out so that I can see only the files that have
> 0%
test coverage. Is it possible?Also is it possible to skip generating mutants for not covered lines/files in the first place? I'm using
jest.enableFindRelatedTests
so I guess Stryker doesn't try to execute tests for uncovered mutants but I don't know how expensive (in terms of computation) it is to generate them. Could skipping it improve performance? Keep in mind that I'm completely new to mutation testing so this idea might be completely stupid and I'm just not seeing that yet :DStryker environment
Additional context
The text was updated successfully, but these errors were encountered: