Add unity3d support to stryker
See original GitHub issueDescribe the bug I’m attempting to run stryker on a unity3d project. There are 4 project files in the project root of this project all generated by unity. Assembly-CSharp-Editor.csproj <- our tests Assembly-CSharp-Editor-firstpass.csproj <- plugins pre compiled by unity and referenced in the tests Assembly-CSharp-firstpass.csproj <- plugins precompiled by unity and referenced in the producetion code Assembly-CSharp.csproj <- production code to be mutated
I’ve tried running stryker with -p Assembly-CSharp.csproj and i’ve included the following stryker-config.json
{
"stryker-config":
{
"solution-path":"word-show.sln",
"project-file":"Assembly-CSharp.csproj"
}
}
Logs
Version 0.11.0 (beta)
[23:56:25 DBG] Stryker started with options: {"BasePath":"/Users/mads/WorkSpaces/word-show","SolutionPath":"/Users/mads/WorkSpaces/word-show/word-show.sln","OutputPath":"/Users/mads/WorkSpaces/word-show/StrykerOutput/2019-06-11.23-56-25","Reporters":["Progress","ClearText"],"LogOptions":{"LogToFile":false,"OutputPath":"/Users/mads/WorkSpaces/word-show/StrykerOutput/2019-06-11.23-56-25","LogLevel":"Debug"},"DevMode":false,"ProjectUnderTestNameFilter":"Assembly-CSharp.csproj","AdditionalTimeoutMS":30000,"ExcludedMutations":[],"ConcurrentTestrunners":6,"Thresholds":{"High":80,"Low":60,"Break":0},"TestRunner":"DotnetTest","FilesToExclude":[]}
[23:56:25 INF] Time Elapsed 00:00:00.2474748
Stryker.NET failed to mutate your project. For more information see the logs below:
Expected exactly one .csproj file, found more than one:
/Users/mads/WorkSpaces/word-show/Assembly-CSharp-Editor.csproj
/Users/mads/WorkSpaces/word-show/Assembly-CSharp-Editor-firstpass.csproj
/Users/mads/WorkSpaces/word-show/Assembly-CSharp-firstpass.csproj
/Users/mads/WorkSpaces/word-show/Assembly-CSharp.csproj
Please fix your project contents
Expected behavior I expected stryker to mutate the production code and run the tests in the test project.
Desktop (please complete the following information):
- OS: macOS 10.14
- Unity 2018.1.9f2, targeting .net 4.7
- Stryker Version 0.11.0
- using NUnit test framework
Additional context None of the guides or documentation mentioned any way to point to the test project. I’m uncertain how stryker knows which project contains the tests or if there is a specific naming convention.
I hope have some insight in how to make stryker run. I would really like to use it for our project. Best Wishes, Mads
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (19 by maintainers)
I created a project for you where we can track progress on this feature and I have added some initial issues for what I think needs to be implemented to implement unity support. See https://github.com/stryker-mutator/stryker-net/projects/2
Duplicate. See #2381