Closed detilium closed 11 months ago
Agreed that this should be a cleaner error, however I don't think the error is caused by having no unit tests:
2023-09-14T13:55:44.6927275+02:00 [INF] Found 3 source projects (c1ce5c69)
2023-09-14T13:55:44.6928587+02:00 [INF] Found 1 test projects (6f0fd09d)
2023-09-14T13:55:44.6965453+02:00 [WRN] Project "src\Voucher.Api\Voucher.Api.csproj" will not be mutated because Stryker did not find a test project for it. (b4dae632)
2023-09-14T13:55:44.6966472+02:00 [WRN] Project "src\Voucher.Core\Voucher.Core.csproj" will not be mutated because Stryker did not find a test project for it. (b4dae632)
2023-09-14T13:55:44.6967040+02:00 [WRN] Project "src\Voucher.Data.Mssql\Voucher.Data.Mssql.csproj" will not be mutated because Stryker did not find a test project for it. (b4dae632)
It seems your unit test project does not reference any source project at all, this likely causes the issue. We are finding 'no project to mutate'. This should be handled gracefully.
Ah yes that resolved the error.
Agreed, would be nice with a user friendly error message :)
Thank you for your quick response.
I think the fix is in master now, but as yet to be delivered. And I think that it covers this situation
That sounds perfect. I'm closing this issue then.
Again thank you for the fast response.
Describe the bug I've setup a completely new solution including a test project (xUnit) running .NET 6, without any unit tests.
I installed Stryker in the project using
dotnet new tool-manifest
anddotnet tool install dotnet-stryker
.I've then tried to run the
dotnet stryker
command both from the root of the solution folder, as well as from the root of the test project folder. Both are resulting in the same exception below:Logs
Expected behavior I would expect Stryke to just inform that there are no tests in the project, then end execution without any exceptions.
Desktop (please complete the following information):
Additional context I've followed the "Getting started" guide from stryker-mutator.io without any exceptions.
I've tried installing "NuGet targets and build tasks" even though I'm not running .NET Framework.
I've upgrading my Visual Studio 2022 to the latest version (v17.7.4).