stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.55k stars 242 forks source link

Urgent <> Unable to get any mutation score and stryker is skipping all run - Stryker dot net #4882

Closed inishantmishra closed 1 week ago

inishantmishra commented 1 week ago

Hi I am running following script to run in my pipeline- dotnet-stryker --test-project "**/*Test.csproj" -m --with-baseline:$(System.PullRequest.TargetBranch) --version $(System.PullRequest.SourceBranch) --open-report --reporter "html" --reporter "progress" --reporter "cleartext" --break-at 80

But I am not getting the score and not getting any result. It seems all mutants are ignore but i haven't added any exclusion logic neither in comments nor in command.

Here are some snippet from logs

[17:30:58 WRN] Failed to load analyzer 'Microsoft.Extensions.Logging.Generators': Exception System.IO.FileLoadException: Assembly with same name is already loaded at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.AnalyzerAssemblyLoader.LoadFromPath(String fullPath) in //src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs:line 126 at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.GetAssembly() at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions1.AddExtensions(Builder builder, String language, Func2 shouldInclude). [17:30:58 WRN] Failed to load analyzer 'Microsoft.Extensions.Options.SourceGeneration': Assembly with same name is already loaded (error : UnableToLoadAnalyzer, analyzer: All). [17:30:58 WRN] Failed to load analyzer 'Microsoft.Extensions.Options.SourceGeneration': Exception System.IO.FileLoadException: Assembly with same name is already loaded at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.AnalyzerAssemblyLoader.LoadFromPath(String fullPath) in //src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs:line 126 at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.GetAssembly() at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions1.AddExtensions(Builder builder, String language, Func2 shouldInclude). [17:31:34 INF] 6417 mutants created [17:31:34 INF] Capture mutant coverage using 'CoverageBasedTest' mode. [17:34:36 INF] 160 mutants got status CompileError. Reason: Mutant caused compile errors [17:34:36 INF] 596 mutants got status Ignored. Reason: Removed by exclude from code coverage filter [17:34:36 INF] 5661 mutants got status Ignored. Reason: Removed by mutate filter [17:34:36 INF] 6417 total mutants are skipped for the above mentioned reasons [17:34:36 INF] 0 total mutants will be tested [17:34:36 WRN] It looks like all mutants with tests were ignored. Try a re-run with less ignoring! [17:34:36 WRN] It looks like all mutants resulted in compile errors. Mutants sure are strange!

Killed: 0 Survived: 0 Timeout: 0

All mutants have been tested, and your mutation score has been calculated

Please help and let me know what is happening or is there anything wrong am i doing?

rouke-broersma commented 1 week ago

This is the wrong repo