Describe the bug
If there is no test project in solution, Stryker throws null reference exception.
Logs
Version: 3.4.0
[09:20:36 INF] Identifying projects to mutate in /builds/apigateway/ApiGateway.sln. This can take a while.
[09:20:40 INF] Found 1 source projects
[09:20:40 INF] Found 0 test projects
[09:20:42 WRN] No test projects could be found for /builds/apigateway/src/ApiGateway/ApiGateway.csproj
[09:20:42 INF] Time Elapsed 00:00:06.1619361
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator)
at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 93
at Stryker.CLI.StrykerCli.<>cDisplayClass10_0.b_0() in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 68
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>cDisplayClass143_0.b_0(CancellationToken )
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Stryker.CLI.StrykerCli.Run(String[] args) in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 74
at Stryker.CLI.Program.Main(String[] args) in //src/Stryker.CLI/Stryker.CLI/Program.cs:line 14
Aborted (core dumped)
ERROR: Job failed: exit code 134
Expected behavior
If there is no test project in solution, it should skip running instead of throwing exception like other dotnet tools such as dotnet test.
Desktop (please complete the following information):
OS: Linux Alpine 3.16 x64
Type of project: Core
Framework Version: .NET 6
Stryker Version: 3.4.0
Additional context
We have many projects using our CI/CD pipeline. Unfortunately some of them do not have any test project. Therefore they fail at mutation testing stage and exit.
Describe the bug If there is no test project in solution, Stryker throws null reference exception.
Logs Version: 3.4.0 [09:20:36 INF] Identifying projects to mutate in /builds/apigateway/ApiGateway.sln. This can take a while. [09:20:40 INF] Found 1 source projects [09:20:40 INF] Found 0 test projects [09:20:42 WRN] No test projects could be found for /builds/apigateway/src/ApiGateway/ApiGateway.csproj [09:20:42 INF] Time Elapsed 00:00:06.1619361 Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 93 at Stryker.CLI.StrykerCli.<>cDisplayClass10_0.b_0() in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 68
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c DisplayClass143_0.b_0(CancellationToken )
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Stryker.CLI.StrykerCli.Run(String[] args) in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 74
at Stryker.CLI.Program.Main(String[] args) in //src/Stryker.CLI/Stryker.CLI/Program.cs:line 14
Aborted (core dumped)
ERROR: Job failed: exit code 134
Expected behavior If there is no test project in solution, it should skip running instead of throwing exception like other dotnet tools such as dotnet test.
Desktop (please complete the following information):
Additional context We have many projects using our CI/CD pipeline. Unfortunately some of them do not have any test project. Therefore they fail at mutation testing stage and exit.