stryker-mutator / mutation-testing-elements

🗃 A schema for mutation testing results with the web components to visualise it 📊
Apache License 2.0
28 stars 19 forks source link

Stryker for .Net framework #39

Closed jtourvieille closed 5 years ago

jtourvieille commented 5 years ago

Hi,

When I run 'dotnet stryker' on a test directory with a .Net framework project, I get the error:

[10:48:20 INF] Using C:\Dev\xxx\src\net45\FizzBuzz\FizzBuzz.Tests\FizzBuzz.Tests.csproj as project file [10:48:22 WRN] Testrunner set from DotnetTest to VsTest because IsTestProject property not set to true. This is only supported for vstest. [10:48:22 INF] Started initial build using msbuild.exe [10:48:22 ERR] An error occurred during the mutation test run System.ArgumentNullException: Value cannot be null. Parameter name: path at System.IO.Path.GetFullPath(String path) at Stryker.Core.Initialisation.InitialBuildProcess.InitialBuild(Boolean fullFramework, String projectPath, String solutionPath, String projectName) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Initialisation\InitialBuildProcess.cs:line 33 at Stryker.Core.Initialisation.InitialisationProcess.Initialize(StrykerOptions options) in D:\a\1\s\src\Stryker.Core\Stryker.Core\Initialisation\InitialisationProcess.cs:line 47 at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options) in D:\a\1\s\src\Stryker.Core\Stryker.Core\StrykerRunner.cs:line 69 [10:48:22 INF] Time Elapsed 00:00:02.1496907

I am using the v0.11.0 (beta) on a very simple project.

Step to reproduce 1-at the sln level 'dotnet tool install -g fotnet-stryker' 2-at the test project level 'dotnet stryker'

Project is .Net 4.5.2.

What did I miss?

Thanks!

richardwerkman commented 5 years ago

This seems to be more of an issue with https://github.com/stryker-mutator/stryker-net and not with the html report.

The solution path path option is required when running stryker on a .net framework project. Try running with:

dotnet stryker --solution-path "..\\mysolution.sln"

.net framework support has not been tested a lot so we should add a clear error message for this case. Thanks for reporting the issue :+1:

jtourvieille commented 5 years ago

Yes, works like a charm, thx. Adding the solution path parameter was unclear for me, sorry.