stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.76k stars 175 forks source link

Read settings from csproj file #117

Closed wmeints closed 4 years ago

wmeints commented 5 years ago

Currently stryker supports reading its settings from a json file. Which I fine I guess. But most other dotnet CLI tools and Visual Studio plugins read their settings from the csproj file.

Not sure what led up to the decision to go with a JSON file, just curious if you thought about putting the settings inside the csproj file.

yaelkeemink commented 5 years ago

We decided that it was easier for a first issue to use a config file instead of reading out of a csproj. But I do want to read the settings from a csproj in the future. One of the problems we still encounter and why we decided to use a config file is that we don't have a way yet to decide which project we want to test with stryker.

richardwerkman commented 5 years ago

@yaelkeemink I don't think that is a problem. The stryker settings would be placed in the unit test projects csproj file. From there the mutationtest run starts and looks for references in this same file. When it encounters more than once referenced project it needs the settings to find the right referenced project to mutate.

But why do we want to place the settings in the csproj file? When .NET Framework support arrives this method would be less preferable. And the older .NET core versions don't have a .csproj file. Using our own settings file makes multi platform targetting more easy for us.

rouke-broersma commented 4 years ago

We have other plans for stryker config so adding the config to the csproj would not work anymore.