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

Mutation score is not calculated when given span of text #3076

Open
shivambagadia23 opened this issue Oct 22, 2024 · 0 comments
Open

Mutation score is not calculated when given span of text #3076

shivambagadia23 opened this issue Oct 22, 2024 · 0 comments
Labels
🐛 Bug Something isn't working

Comments

@shivambagadia23
Copy link

Describe the bug
I want to calculate the mutation score of only the changed lines of code after raising a pull request. After having this discussion, I decided to use -m config provided by stryker. When i pass the command dotnet-stryker -m "**/SomeFile.cs" mutation score gets calculated but after passing command dotnet-stryker -m "/SomeFile.cs{7...66}" the score does not get claculated and instead mutation gets ignored. I also checked for mutants between those lines and there exists alot of mutants also test cases are written for them.

Logs
Analysis complete.
Building solution somefile.sln
Building project somefile.sln using dotnet build somefile.sln
Number of tests found: 3 for project Initial test run started.
277 mutants created
Capture mutant coverage using 'CoverageBasedTest' mode.
Hint: by passing "--open-report or -o" the report will open automatically and update the report in real-time.
4 mutants got status CompileError. Reason: Mutant caused compile errors
273 mutants got status Ignored. Reason: Removed by mutate filter
277 total mutants are skipped for the above mentioned reasons
0 total mutants will be tested
It looks like all mutants with tests were ignored. Try a re-run with less ignoring!
It looks like all mutants resulted in compile errors. Mutants sure are strange!

Expected behavior
When I pass the line numbers with filename to -m config I expected it to give me the mutation score for that line span if mutations exists for those lines which in my case does.

Desktop (please complete the following information):

  • OS: [e.g. Windows] - Windows
  • Type of project [framework, core, xamarin] - c# dotnet
  • Framework Version [e.g. core 2.2] - .NET Core sdk 8.0.x
  • Stryker Version [e.g. beta 0.10.0] - dotnet-stryker 4.0.6
@shivambagadia23 shivambagadia23 added the 🐛 Bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant