question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stryker fails to find all rollbackable mutations

See original GitHub issue

Describe the bug We have one test project XXX.Tests it is .Net Core 2.1, it have references to two .Net Standard 2.0 projects - XXX.Api & XXX.Core

With XXX.Core project all working as expected, thanks.

But for XXX.Api it fails with exception

Logs

[09:07:06 INF] Started initial build using dotnet build
[09:07:09 INF] Initial build successful
[09:07:09 INF] Using testrunner DotnetTest
[09:07:09 INF] Initial testrun started
[09:07:13 INF] Total number of tests found in initial test run: 0
[09:07:13 INF] Initial testrun successful in 3532 ms
[09:07:13 INF] Using 105298 ms as testrun timeout
[09:07:16 WRN] Stryker.NET encountered an compile error in C:\Work\XX\XXX.Api\Clients\XXXX.cs with message: Argument 2: cannot convert from 'System.Exception' to 'System.Runtime.Serialization.StreamingContext' (Source code: innerException)
[09:07:16 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.
[09:07:16 FTL] Stryker.NET could not compile the project after mutation. This is probably an error for Stryker.NET and not your project. Please report this issue on github with the previous error message.
[09:07:16 ERR] An error occurred during the mutation test run
System.ApplicationException: Internal error due to compile error.
   at Stryker.Core.Compiling.RollbackProcess.RemoveMutantIfStatements(SyntaxTree originalTree, ICollection`1 diagnosticInfo, Boolean devMode) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Compiling\RollbackProcess.cs:line 191
   at Stryker.Core.Compiling.RollbackProcess.Start(CSharpCompilation compiler, ImmutableArray`1 diagnostics, Boolean devMode) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Compiling\RollbackProcess.cs:line 61
   at Stryker.Core.Compiling.CompilingProcess.TryCompilation(MemoryStream ms, CSharpCompilation compilation, EmitResult previousEmitResult, Boolean devMode, Int32 retryCount) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Compiling\CompilingProcess.cs:line 108
   at Stryker.Core.Compiling.CompilingProcess.Compile(IEnumerable`1 syntaxTrees, MemoryStream ms, Boolean devMode) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Compiling\CompilingProcess.cs:line 76
   at Stryker.Core.MutationTest.MutationTestProcess.Mutate(StrykerOptions options) in D:\a\1\s\src\Stryker.Core\Stryker.Core\MutationTest\MutationTestProcess.cs:line 91
   at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options) in D:\a\1\s\src\Stryker.Core\Stryker.Core\StrykerRunner.cs:line 77
[09:07:16 INF] Time Elapsed 00:00:14.8422309

Expected behavior For XXX.Api same behavior as for XXX.Core:

[09:02:52 INF] Started initial build using dotnet build
[09:02:58 INF] Initial build successful
[09:02:58 INF] Using testrunner DotnetTest
[09:02:58 INF] Initial testrun started
[09:03:01 INF] Total number of tests found in initial test run: 0
[09:03:01 INF] Initial testrun successful in 3541 ms
[09:03:01 INF] Using 105311 ms as testrun timeout
[09:03:05 INF] 1 mutants could not compile and got status CompileError
[09:03:05 INF] 64 mutants ready for test

Your html report has been generated at:
 C:\Work\XX\XXX.UnitTests\StrykerOutput\2019-05-27.09-02-47\reports\mutation-report.html
You can open it in your browser of choice.
[09:04:49 INF] Time Elapsed 00:02:02.3004631

Desktop (please complete the following information):

  • OS: Windows 10 x64
  • Type of project xamarin
  • Framework Version .Net Core 2.1 & .Net Standard 2.0
  • Stryker Version 0.11.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rouke-broersmacommented, May 27, 2019

We are investigating the root cause, this should not have happened as we have a fallback mechanism in case a mutation causes a compile failure. In your case it seems to have fallen through anyway. You can keep this issue open and we will implement a fix.

If you find out what’s wrong with NUnit I would appreciate a new issue with details so we can investigate that as well.

1reaction
bbenetskyycommented, Feb 28, 2020

Just check with that project with newer version it works for me 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Stryker Mutator
Below you'll find an ever-growing list of issues that you might occur when running StrykerJS on your project for the first time.
Read more >
npm run stryker fails Error: Cannot find module 'mutation- ...
Stryker started failing because of unloaded module 'mutation-testing-report-schema/dist/src/api'. I tried deleting node_modules and npm ...
Read more >
Bundle mutations and rollback in case of error - GraphQL
If one of these mutations fail, currently the client has to check every mutation for errors and roll-back all previous ones. It would...
Read more >
Is this character being impersonated? - marvel
It is indeed Mystique rescuing Logan by pretending to be Stryker. ... is masquerading as a military character saving mutants from going into ......
Read more >
Single source preauthorization code list
Effective 1/1/2020 DME/Orthotics/Prosthetic items requiring preauthorization will be individually listed below on the single source preauthorization code list.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found