Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple configuration files #2640

Closed
patwalb opened this issue Aug 17, 2023 · 3 comments
Closed

Allow multiple configuration files #2640

patwalb opened this issue Aug 17, 2023 · 3 comments
Labels
🚀 Feature request New feature or request

Comments

@patwalb
Copy link

patwalb commented Aug 17, 2023

Configuring solutions with many projects

I use Stryker .NET for larger solutions. Currently, I am integrating version 3.10 in a solution that contains about 20 source and 20 unittest projects. So frankly speaking, I would need 20 stryker-config.json files to configure this solution-wide. One for each testProject(e.g. for excluding files, setting threshold). That requires a lot of maintaining etc.
Currently, I trigger all 20 stryker runs from a shell script (The dashboard/solution mode is no alternative for me). That works quite fine, just the configuration is a bit an obstacle

I think it would be really adventagous to allow one solutionwide stryker-config.json that defines e.g. threshold levels, mutation-level etc. for all projects within a solution.
Additionally, there would be also one project-based stryker-config.json (optional) for each project. It would add or override additional attributes, such as excluded files.
Currently, it is just possible to read-in one config file.

If I want like to change the thresholds I need to change it currently in twenty project-basedstryker-config.json files.

I could imagine to call the new configuration like this dotnet stryker --project <projectA> --config-file solution-stryker-config.json --config-file <projectA>/stryker-config.json (second config file is higher prior)

Alternative

Also an option would be to configure the global/solutionwide settings in my script by calling dotnet stryker --<solutionWideConfig1> ... --<solutionWideConfigN> and would add addtional/projectspecific config in the stryker-config.json based in the project.
Nevertheless, the commandLineArguments are higher prior then the one of the config file and for some reasons for certain option no command line configuration exists, e.g. Thresholds.

Also an option is to have an "own" solution-stryker-config.json and merge it via script (e.g. Python) in each of the project-based stryker-configs.json files. This is the alternative I consider.

I think I am quite familiar now with Stryker, but maybe it overlooked an option how you do it. Interested to hear feedback :) 👍

@patwalb patwalb added the 🚀 Feature request New feature or request label Aug 17, 2023
@rouke-broersma
Copy link
Member

Iirc we already have an open issue for this feature request. It is something we want to support when we have the bandwidth to properly design and implement this.

@rouke-broersma rouke-broersma closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2023
@tomdaniel-mensura
Copy link

@rouke-broersma Can you please link the already open issue to this one, so that this discussion isn't a dead end? (aka just referencing it in a comment)

@rouke-broersma
Copy link
Member

#2323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants