Closed tommysor closed 1 year ago
thanks for opening this issue. I have been able to reproduce the problem via your project. I confirm this is bug, likely due to the massive redesign of the so called 'solution mode' in V3.9.
The good news is that I have a workaround solution for you (see next comment to understand why I no longer see this as a workaround).
please remove reference to relative path for the 'project' parameters. Like this:
{
"stryker-config": {
"project": "src/SimplifiedSearch/SimplifiedSearch.csproj",
"ignore-methods": [
"ConfigureAwait"
],
...
The problem comes from how this parameter is interpreted. I will work on a fix, but the workaround should be durable, i.e. still valid once the fix is released.
I analyzed a bit further to under why there is a regression: it looks to me it is because the project
parameter was ignored when ran in solution mode, i.e. when Stryker is run from the solution directory. In V 3.8.x and earlier, Stryker identified test project(s) (using solution analysis and configured test projects, if any); it then mutated any project tested by one or more of these projects, disregarding the project
option.
Now this option is taken into account, but it is supposed to host the project file name not the project path (see the doc).
So I will close this issue, as the problem is (more or less) in older version which should have warned about this unneeded option. NB : will see how to improve error reporting anyway, since this was an abrupt crash in all cases
Describe the bug Unhandled exception during initialization. This error does not happen when using Stryker 3.8.2 (completes successfully). Stryker 3.9.0 and 3.10.0 fail
Logs Console output (shortened) for success (v3.8.2), then failure (v3.10.0)
Log from failing run
Expected behavior Mutation test completes
Desktop (please complete the following information):
Additional context Repro (not minimal) https://github.com/tommysor/SimplifiedSearch
dotnet stryker --reporter Dots --log-to-file
Must use --reporter to override stryker-config.json (to avoid failing due to missing api-key for --reporter Dashboard)Location of error I believe the error happens on
ProjectOrchestrator.cs:57
(projectInfos.First()
) https://github.com/stryker-mutator/stryker-net/blob/adfe7c2590ab09d1e1442982a17a9dc80513398a/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs#L45-L57projectInfos
gets its value from https://github.com/stryker-mutator/stryker-net/blob/adfe7c2590ab09d1e1442982a17a9dc80513398a/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs#L52-L58And then here. I assume something goes wrong here, but I can't tell where. https://github.com/stryker-mutator/stryker-net/blob/adfe7c2590ab09d1e1442982a17a9dc80513398a/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs#L49-L89