From 859782dfff6743945413d9bf24b5b28ee3edbac7 Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger Date: Fri, 17 Jul 2026 19:26:38 +0200 Subject: [PATCH 1/2] Add tool wrapper definition for `Stryker` --- src/Fallout.Common/Tools/Stryker/Stryker.json | 214 ++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 src/Fallout.Common/Tools/Stryker/Stryker.json diff --git a/src/Fallout.Common/Tools/Stryker/Stryker.json b/src/Fallout.Common/Tools/Stryker/Stryker.json new file mode 100644 index 000000000..0215f1741 --- /dev/null +++ b/src/Fallout.Common/Tools/Stryker/Stryker.json @@ -0,0 +1,214 @@ +{ + "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", + "references": [ + "https://raw.githubusercontent.com/stryker-mutator/stryker-net/master/src/Stryker.CLI/Stryker.CLI/Program.cs" + ], + "name": "Stryker", + "officialUrl": "https://stryker-mutator.io/docs/stryker-net/configuration", + "help": "Stryker.NET offers you mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet. New to Stryker.NET? Begin with our guide on getting started", + "nugetPackageId": "dotnet-stryker", + "packageExecutable": "Stryker.CLI.dll", + "customLogger": true, + "tasks": [ + { + "settingsClass": { + "properties": [ + { + "name": "ConfigFile", + "type": "string", + "format": "--config-file {value}", + "default": "\"stryker-config.json\"", + "help": "Path / Name of the configuration file. You can specify a custom path to the config file. For example if you want to add the stryker config section to your appsettings file. The section should still be called stryker-config." + }, + { + "name": "Solution", + "type": "string", + "format": "--solution {value}", + "help": "The solution path can be supplied to help with dependency resolution. If stryker is ran from the solution file location the solution file will be analyzed and all projects in the solution will be tested by stryker." + }, + { + "name": "Project", + "type": "string", + "format": "--project {value}", + "help": "The project file name is required when your test project has more than one project reference. Stryker can currently mutate one project under test for 1..N test projects but not 1..N projects under test for one test project.
Do not pass a path to this option. Pass the project file name as it appears in your test project's references" + }, + { + "name": "TestProjects", + "type": "List", + "format": "--test-project {value}", + "help": "When you have multiple test projects covering one project under test you may specify all relevant test projects in the config file. You must run stryker from the project under test instead of the test project directory when using multiple test projects." + }, + { + "name": "Mutate", + "type": "List", + "format": "--mutate {value}", + "help": "

With mutate you configure the subset of files to use for mutation testing. Only source files part of your project will be taken into account. When this option is not specified the whole project will be mutated. You can add an ! in front of the pattern to exclude instead of include matching files. This can be used to for example ignore generated files while mutating.

When only exclude patterns are provided, all files will be included that do not match any exclude pattern. If both include and exclude patterns are provided, only the files that match an include pattern but not also an exclude pattern will be included. The order of the patterns is irrelevant.

The patterns support globbing syntax to allow wildcards.

Example :

PatternsFileWill be mutated
nullMyFolder/MyFactory.csYes
'**/*.*'MyFolder/MyFactory.csYes
'!**/MyFactory.cs'MyFolder/MyFactory.csNo

To allow more fine-grained filtering you can also specify the span of text that should be in- or excluded. A span is defined by the indices of the first character and the last character. dotnet stryker -m \"MyFolder/MyService.cs{10..100}\"

" + }, + { + "name": "Configuration", + "type": "string", + "format": "--configuration {value}", + "help": "Allows you to specify the build configuration to use when building the project. This can be useful when you want to test the release build of your project." + }, + { + "name": "TargetFramework", + "type": "string", + "format": "--target-framework {value}", + "help": "Randomly selected. If the project targets multiple frameworks, this way you can specify the particular framework to build against. If you specify a non-existent target, Stryker will build the project against a random one (or the only one if so)." + }, + { + "name": "ProjectInfoVersion", + "type": "string", + "format": "--version {value}", + "help": "The version of the report. This should be filled with the branch name, git tag or git sha (although no validation is done). You can override a report of a specific version, like docker tags. Slashes in the version should not be encoded. For example, it's valid to use \"feat/logging\"." + }, + { + "name": "MutationLevel", + "type": "StrykerMutationLevel", + "default": "StrykerMutationLevel.Standard", + "help": "Stryker supports multiple mutation levels. Each level comes with a specific set of mutations. Each level contains the mutations of the levels below it. By setting the level to Complete you will get all possible mutations and thus the strictest mutation test. This comes at the price of longer runtime as more mutations will be generated and tested." + }, + { + "name": "Reporters", + "type": "List", + "format": "--reporter {value}", + "default": "new List() { StrykerReporter.Html, StrykerReporter.Progress }" + }, + { + "name": "OpenReport", + "type": "StrykerOpenReport", + "format": "--open-report:{value}", + "default": "StrykerOpenReport.Html", + "help": "When this option is passed, generated reports should open in the browser automatically once Stryker starts testing mutants, and will update the report till Stryker is done. Both html and dashboard reports can be opened automatically." + }, + { + "name": "Concurrency", + "type": "uint", + "format": "--concurrency {value}", + "help": "Change the amount of concurrent workers Stryker uses for the mutation testrun. Defaults to using half your logical (virtual) processor count.

Example: an intel i7 quad-core with hyperthreading has 8 logical cores and 4 physical cores. Stryker will use 4 concurrent workers when using the default.

" + }, + { + "name": "BreakAt", + "type": "uint", + "format": "--break-at {value}", + "default": "0", + "help": "Must be less than or equal to threshold low. When threshold break is set to anything other than 0 and the mutation score is lower than the threshold Stryker will exit with a non-zero code. This can be used in a CI pipeline to fail the pipeline when your mutation score is not sufficient." + }, + { + "name": "ThresholdHigh", + "type": "uint", + "format": "--threshold-high {value}", + "default": "80", + "help": "Minimum good mutation score. Must be higher than or equal to threshold low. Must be higher than 0." + }, + { + "name": "ThresholdLow", + "type": "uint", + "format": "--threshold-low {value}", + "default": "60", + "help": "Minimum acceptable mutation score. Must be less than or equal to threshold high and more than or equal to threshold break." + }, + { + "name": "Output", + "type": "string", + "format": "--output {value}", + "help": "Changes the output path for Stryker logs and reports. This can be an absolute or relative path." + }, + { + "name": "DisableBail", + "type": "bool", + "format": "--disable-bail", + "help": "Stryker aborts a unit testrun for a mutant as soon as one test fails because this is enough to confirm the mutant is killed. This can reduce the total runtime but also means you miss information about individual unit tests (e.g. if a unit test does not kill any mutants and is therefore useless). You can disable this behavior and run all unit tests for a mutant to completion. This can be especially useful when you want to find useless unit tests." + }, + { + "name": "Since", + "type": "string", + "format": "--since:{value}", + "help": "

Use git information to test only code changes since the given target. Stryker will only report on mutants within the changed code. All other mutants will not have a result.

If you wish to test only changed sources and tests but would like to have a complete mutation report see with-baseline.

Set the diffing target on the command line by passing a committish with the since flag in the format --since:. Set the diffing target in the config file by setting the since target option.

* For changes on test project files all mutants covered by tests in that file will be seen as changed.

" + }, + { + "name": "Verbosity", + "type": "StrykerVerbosity", + "format": "--verbosity {value}", + "default": "StrykerVerbosity.Trace", + "help": "Change the console verbosity of Stryker when you want more or less details about the mutation testrun." + }, + { + "name": "LogToFile", + "type": "bool", + "format": "--log-to-file", + "noArgument": true, + "help": "When creating an issue on github you can include a logfile so the issue can be diagnosed easier.

File logging always uses loglevel trace.

" + }, + { + "name": "DevMode", + "type": "bool", + "format": "--dev-mode", + "noArgument": true, + "help": "Stryker will not gracefully recover from compilation errors, but instead crash immediately. Used during development to quickly diagnose errors.

Also enables more debug logs not generally useful to normal users.

" + }, + { + "name": "DashboardApiKey", + "type": "string", + "format": "--dashboard-api-key {value}", + "help": "The API key for authentication with the Stryker dashboard.
Get your api key at the stryker dashboard. To keep your api key safe, store it in an encrypted variable in your pipeline." + }, + { + "name": "MsBuildPath", + "type": "string", + "format": "--msbuild-path {value}", + "help": "By default, Stryker tries to auto-discover msbuild on your system. If Stryker fails to discover msbuild you may supply the path to msbuild manually with this option." + }, + { + "name": "BreakOnInitialTestFailure", + "type": "bool", + "format": "--break-on-initial-test-failure", + "noArgument": true, + "help": "Instruct Stryker to break execution when at least one test failed on initial test run." + } + ] + } + } + ], + "enumerations": [ + { + "name": "StrykerMutationLevel", + "values": [ + "Basic", + "Standard", + "Advanced", + "Complete" + ] + }, + { + "name": "StrykerReporter", + "values": [ + "All", + "Html", + "Progress", + "Dashboard", + "Cleartext", + "CleartextTree", + "Dots", + "Json" + ] + }, + { + "name": "StrykerOpenReport", + "values": [ + "Html", + "Dashboard" + ] + }, + { + "name": "StrykerVerbosity", + "values": [ + "Error", + "Warning", + "Info", + "Debug", + "Trace" + ] + } + ] +} \ No newline at end of file From 93f05c2869a58cb4d3a735f2a6636ad2ffd4d12e Mon Sep 17 00:00:00 2001 From: Lukas Gasselsberger Date: Sat, 18 Jul 2026 22:47:10 +0200 Subject: [PATCH 2/2] Add missing `Stryker` cli options --- .../Tools/Stryker/Stryker.Generated.cs | 537 ++++++++++++++++++ src/Fallout.Common/Tools/Stryker/Stryker.json | 478 +++++++++------- 2 files changed, 802 insertions(+), 213 deletions(-) create mode 100644 src/Fallout.Common/Tools/Stryker/Stryker.Generated.cs diff --git a/src/Fallout.Common/Tools/Stryker/Stryker.Generated.cs b/src/Fallout.Common/Tools/Stryker/Stryker.Generated.cs new file mode 100644 index 000000000..ae47aab9f --- /dev/null +++ b/src/Fallout.Common/Tools/Stryker/Stryker.Generated.cs @@ -0,0 +1,537 @@ +// Generated from https://github.com/Fallout-build/Fallout/blob/main/src/Fallout.Common/Tools/Stryker/Stryker.json + +using Fallout.Common; +using Fallout.Common.Tooling; +using Fallout.Common.Tools; +using Fallout.Common.Utilities.Collections; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; + +namespace Fallout.Common.Tools.Stryker; + +///

Stryker.NET offers you mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet. New to Stryker.NET? Begin with our guide on getting started

For more details, visit the official website.

+[ExcludeFromCodeCoverage] +[NuGetTool(Id = PackageId, Executable = PackageExecutable)] +public partial class StrykerTasks : ToolTasks, IRequireNuGetPackage +{ + public static string StrykerPath { get => new StrykerTasks().GetToolPathInternal(); set => new StrykerTasks().SetToolPath(value); } + public const string PackageId = "dotnet-stryker"; + public const string PackageExecutable = "Stryker.CLI.dll"; + ///

Stryker.NET offers you mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet. New to Stryker.NET? Begin with our guide on getting started

For more details, visit the official website.

+ public static IReadOnlyCollection Stryker(ArgumentStringHandler arguments, string workingDirectory = null, IReadOnlyDictionary environmentVariables = null, int? timeout = null, bool? logOutput = null, bool? logInvocation = null, Action logger = null, Func exitHandler = null) => new StrykerTasks().Run(arguments, workingDirectory, environmentVariables, timeout, logOutput, logInvocation, logger, exitHandler); + ///

Stryker.NET offers you mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet. New to Stryker.NET? Begin with our guide on getting started

For more details, visit the official website.

+ ///

This is a CLI wrapper with fluent API that allows to modify the following arguments:

  • --azure-fileshare-sas via
  • --break-at via
  • --break-on-initial-test-failure via
  • --concurrency via
  • --config-file via
  • --configuration via
  • --dashboard-api-key via
  • --dev-mode via
  • --diag via
  • --disable-bail via
  • --log-to-file via
  • --msbuild-path via
  • --mutate via
  • --mutation-level via
  • --open-report via
  • --output via
  • --project via
  • --reporter via
  • --s3-bucket-name via
  • --s3-endpoint via
  • --s3-region via
  • --since via
  • --solution via
  • --target-framework via
  • --test-project via
  • --test-runner via
  • --threshold-high via
  • --threshold-low via
  • --verbosity via
  • --version via
  • --with-baseline via
+ public static IReadOnlyCollection Stryker(StrykerSettings options = null) => new StrykerTasks().Run(options); + /// + public static IReadOnlyCollection Stryker(Configure configurator) => new StrykerTasks().Run(configurator.Invoke(new StrykerSettings())); + /// + public static IEnumerable<(StrykerSettings Settings, IReadOnlyCollection Output)> Stryker(CombinatorialConfigure configurator, int degreeOfParallelism = 1, bool completeOnFailure = false) => configurator.Invoke(Stryker, degreeOfParallelism, completeOnFailure); +} +#region StrykerSettings +/// +[ExcludeFromCodeCoverage] +[Command(Type = typeof(StrykerTasks), Command = nameof(StrykerTasks.Stryker))] +public partial class StrykerSettings : ToolOptions +{ + /// Path / Name of the configuration file. You can specify a custom path to the config file. For example if you want to add the stryker config section to your appsettings file. The section should still be called stryker-config. + [Argument(Format = "--config-file {value}")] public string ConfigFile => Get(() => ConfigFile); + /// The solution path can be supplied to help with dependency resolution. If stryker is ran from the solution file location the solution file will be analyzed and all projects in the solution will be tested by stryker. + [Argument(Format = "--solution {value}")] public string Solution => Get(() => Solution); + /// The project file name is required when your test project has more than one project reference. Stryker can currently mutate one project under test for 1..N test projects but not 1..N projects under test for one test project.
Do not pass a path to this option. Pass the project file name as it appears in your test project's references
+ [Argument(Format = "--project {value}")] public string Project => Get(() => Project); + /// When you have multiple test projects covering one project under test you may specify all relevant test projects in the config file. You must run stryker from the project under test instead of the test project directory when using multiple test projects. + [Argument(Format = "--test-project {value}")] public IReadOnlyList TestProjects => Get>(() => TestProjects); + ///

With mutate you configure the subset of files to use for mutation testing. Only source files part of your project will be taken into account. When this option is not specified the whole project will be mutated. You can add an ! in front of the pattern to exclude instead of include matching files. This can be used to for example ignore generated files while mutating.

When only exclude patterns are provided, all files will be included that do not match any exclude pattern. If both include and exclude patterns are provided, only the files that match an include pattern but not also an exclude pattern will be included. The order of the patterns is irrelevant.

The patterns support globbing syntax to allow wildcards.

Example :

PatternsFileWill be mutated
nullMyFolder/MyFactory.csYes
'**/*.*'MyFolder/MyFactory.csYes
'!**/MyFactory.cs'MyFolder/MyFactory.csNo

To allow more fine-grained filtering you can also specify the span of text that should be in- or excluded. A span is defined by the indices of the first character and the last character. dotnet stryker -m "MyFolder/MyService.cs{10..100}"

+ [Argument(Format = "--mutate {value}")] public IReadOnlyList Mutate => Get>(() => Mutate); + /// Allows you to specify the build configuration to use when building the project. This can be useful when you want to test the release build of your project. + [Argument(Format = "--configuration {value}")] public string Configuration => Get(() => Configuration); + /// Randomly selected. If the project targets multiple frameworks, this way you can specify the particular framework to build against. If you specify a non-existent target, Stryker will build the project against a random one (or the only one if so). + [Argument(Format = "--target-framework {value}")] public string TargetFramework => Get(() => TargetFramework); + /// The version of the report. This should be filled with the branch name, git tag or git sha (although no validation is done). You can override a report of a specific version, like docker tags. Slashes in the version should not be encoded. For example, it's valid to use "feat/logging". + [Argument(Format = "--version {value}")] public string ProjectInfoVersion => Get(() => ProjectInfoVersion); + /// Stryker supports multiple mutation levels. Each level comes with a specific set of mutations. Each level contains the mutations of the levels below it. By setting the level to Complete you will get all possible mutations and thus the strictest mutation test. This comes at the price of longer runtime as more mutations will be generated and tested. + [Argument(Format = "--mutation-level {value}")] public StrykerMutationLevel MutationLevel => Get(() => MutationLevel); + /// + [Argument(Format = "--reporter {value}")] public IReadOnlyList Reporters => Get>(() => Reporters); + /// When this option is passed, generated reports should open in the browser automatically once Stryker starts testing mutants, and will update the report till Stryker is done. Both html and dashboard reports can be opened automatically. + [Argument(Format = "--open-report:{value}")] public StrykerOpenReport OpenReport => Get(() => OpenReport); + /// Change the amount of concurrent workers Stryker uses for the mutation testrun. Defaults to using half your logical (virtual) processor count.

Example: an intel i7 quad-core with hyperthreading has 8 logical cores and 4 physical cores. Stryker will use 4 concurrent workers when using the default.

+ [Argument(Format = "--concurrency {value}")] public uint? Concurrency => Get(() => Concurrency); + /// Must be less than or equal to threshold low. When threshold break is set to anything other than 0 and the mutation score is lower than the threshold Stryker will exit with a non-zero code. This can be used in a CI pipeline to fail the pipeline when your mutation score is not sufficient. + [Argument(Format = "--break-at {value}")] public uint? BreakAt => Get(() => BreakAt); + /// Minimum good mutation score. Must be higher than or equal to threshold low. Must be higher than 0. + [Argument(Format = "--threshold-high {value}")] public uint? ThresholdHigh => Get(() => ThresholdHigh); + /// Minimum acceptable mutation score. Must be less than or equal to threshold high and more than or equal to threshold break. + [Argument(Format = "--threshold-low {value}")] public uint? ThresholdLow => Get(() => ThresholdLow); + /// Changes the output path for Stryker logs and reports. This can be an absolute or relative path. + [Argument(Format = "--output {value}")] public string Output => Get(() => Output); + /// Stryker aborts a unit testrun for a mutant as soon as one test fails because this is enough to confirm the mutant is killed. This can reduce the total runtime but also means you miss information about individual unit tests (e.g. if a unit test does not kill any mutants and is therefore useless). You can disable this behavior and run all unit tests for a mutant to completion. This can be especially useful when you want to find useless unit tests. + [Argument(Format = "--disable-bail")] public bool? DisableBail => Get(() => DisableBail); + /// Enabling with-baseline saves the mutation report to a storage location such as the filesystem. The mutation report is loaded at the start of the next mutation run. Any changed source code or unit test results in a reset of the mutants affected by the change. For unchanged mutants the previous result is reused. This feature expands on the since feature by providing you with a full report after a partial mutation testrun. + [Argument(Format = "--with-baseline:{value}")] public string WithBaseline => Get(() => WithBaseline); + ///

Use git information to test only code changes since the given target. Stryker will only report on mutants within the changed code. All other mutants will not have a result.

If you wish to test only changed sources and tests but would like to have a complete mutation report see with-baseline.

Set the diffing target on the command line by passing a committish with the since flag in the format --since:. Set the diffing target in the config file by setting the since target option.

* For changes on test project files all mutants covered by tests in that file will be seen as changed.

+ [Argument(Format = "--since:{value}")] public string Since => Get(() => Since); + /// Change the console verbosity of Stryker when you want more or less details about the mutation testrun. + [Argument(Format = "--verbosity {value}")] public StrykerVerbosity Verbosity => Get(() => Verbosity); + /// When creating an issue on github you can include a logfile so the issue can be diagnosed easier.

File logging always uses loglevel trace.

+ [Argument(Format = "--log-to-file")] public bool? LogToFile => Get(() => LogToFile); + /// Stryker will not gracefully recover from compilation errors, but instead crash immediately. Used during development to quickly diagnose errors.

Also enables more debug logs not generally useful to normal users.

+ [Argument(Format = "--dev-mode")] public bool? DevMode => Get(() => DevMode); + /// Enable diagnostic logging. This option produces verbose diagnostic output that is useful for troubleshooting problems or when reporting issues. + [Argument(Format = "--diag")] public bool? Diag => Get(() => Diag); + /// The API key for authentication with the Stryker dashboard.
Get your api key at the stryker dashboard. To keep your api key safe, store it in an encrypted variable in your pipeline.
+ [Argument(Format = "--dashboard-api-key {value}")] public string DashboardApiKey => Get(() => DashboardApiKey); + /// By default, Stryker tries to auto-discover msbuild on your system. If Stryker fails to discover msbuild you may supply the path to msbuild manually with this option. + [Argument(Format = "--msbuild-path {value}")] public string MsBuildPath => Get(() => MsBuildPath); + /// Instruct Stryker to break execution when at least one test failed on initial test run. + [Argument(Format = "--break-on-initial-test-failure")] public bool? BreakOnInitialTestFailure => Get(() => BreakOnInitialTestFailure); + /// Specifies the test runner to use for executing tests during mutation testing.

Available options:

  • vstest - The traditional Visual Studio Test Platform runner (default)
  • mtp - The Microsoft Test Platform runner (preview)


The MTP test runner is a modern alternative that provides better performance in certain scenarios and supports newer testing frameworks like TUnit. However, it's still in preview and may have limitations compared to the VsTest runner.
+ [Argument(Format = "--test-runner {value}")] public StrykerTestRunner TestRunner => Get(() => TestRunner); + /// When using the azure file storage provider you must pass credentials for the fileshare to Stryker. For authentication with the azure fileshare we support Shared Access Signatures (SAS).

The SAS should be configured with the following properties:

Allowed services:
Allowed resource types:
ContainerObject

Allowed permissions:
Read
,
Write
,
Create


For more information on how to configure a SAS check the Azure documentation.
+ [Argument(Format = "--azure-fileshare-sas {value}")] public string AzureFileshareSas => Get(() => AzureFileshareSas); + /// When using the S3 provider you must set the bucket name where baselines will be stored.

The baseline reports are stored under the key
StrykerOutput//stryker-report.json
within the bucket by default. If a project name is set, the key becomes
StrykerOutput///stryker-report.json
.
+ [Argument(Format = "--s3-bucket-name {value}")] public string S3BucketName => Get(() => S3BucketName); + /// When using the S3 provider, setting the region is optional. If not set, the AWS SDK resolves the region using its default configuration chain (for example environment variables or shared profiles). + [Argument(Format = "--s3-region {value}")] public string S3Region => Get(() => S3Region); + /// When using a non-AWS S3-compatible service (e.g. MinIO, Backblaze B2) you can set a custom endpoint URL. This is optional; when not set the default AWS S3 endpoint is used.

Authentication uses the default AWS credential resolution chain (environment variables, shared credentials file, IAM role, etc.). For non-AWS services, set
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
environment variables.
+ [Argument(Format = "--s3-endpoint {value}")] public string S3Endpoint => Get(() => S3Endpoint); +} +#endregion +#region StrykerSettingsExtensions +/// +[ExcludeFromCodeCoverage] +public static partial class StrykerSettingsExtensions +{ + #region ConfigFile + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ConfigFile))] + public static T SetConfigFile(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.ConfigFile, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ConfigFile))] + public static T ResetConfigFile(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.ConfigFile)); + #endregion + #region Solution + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Solution))] + public static T SetSolution(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Solution, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Solution))] + public static T ResetSolution(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Solution)); + #endregion + #region Project + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Project))] + public static T SetProject(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Project, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Project))] + public static T ResetProject(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Project)); + #endregion + #region TestProjects + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T SetTestProjects(this T o, params string[] v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.TestProjects, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T SetTestProjects(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.TestProjects, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T AddTestProjects(this T o, params string[] v) where T : StrykerSettings => o.Modify(b => b.AddCollection(() => o.TestProjects, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T AddTestProjects(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.AddCollection(() => o.TestProjects, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T RemoveTestProjects(this T o, params string[] v) where T : StrykerSettings => o.Modify(b => b.RemoveCollection(() => o.TestProjects, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T RemoveTestProjects(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.RemoveCollection(() => o.TestProjects, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestProjects))] + public static T ClearTestProjects(this T o) where T : StrykerSettings => o.Modify(b => b.ClearCollection(() => o.TestProjects)); + #endregion + #region Mutate + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T SetMutate(this T o, params string[] v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Mutate, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T SetMutate(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Mutate, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T AddMutate(this T o, params string[] v) where T : StrykerSettings => o.Modify(b => b.AddCollection(() => o.Mutate, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T AddMutate(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.AddCollection(() => o.Mutate, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T RemoveMutate(this T o, params string[] v) where T : StrykerSettings => o.Modify(b => b.RemoveCollection(() => o.Mutate, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T RemoveMutate(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.RemoveCollection(() => o.Mutate, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Mutate))] + public static T ClearMutate(this T o) where T : StrykerSettings => o.Modify(b => b.ClearCollection(() => o.Mutate)); + #endregion + #region Configuration + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Configuration))] + public static T SetConfiguration(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Configuration, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Configuration))] + public static T ResetConfiguration(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Configuration)); + #endregion + #region TargetFramework + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TargetFramework))] + public static T SetTargetFramework(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.TargetFramework, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TargetFramework))] + public static T ResetTargetFramework(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.TargetFramework)); + #endregion + #region ProjectInfoVersion + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ProjectInfoVersion))] + public static T SetProjectInfoVersion(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.ProjectInfoVersion, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ProjectInfoVersion))] + public static T ResetProjectInfoVersion(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.ProjectInfoVersion)); + #endregion + #region MutationLevel + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.MutationLevel))] + public static T SetMutationLevel(this T o, StrykerMutationLevel v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.MutationLevel, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.MutationLevel))] + public static T ResetMutationLevel(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.MutationLevel)); + #endregion + #region Reporters + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T SetReporters(this T o, params StrykerReporter[] v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Reporters, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T SetReporters(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Reporters, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T AddReporters(this T o, params StrykerReporter[] v) where T : StrykerSettings => o.Modify(b => b.AddCollection(() => o.Reporters, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T AddReporters(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.AddCollection(() => o.Reporters, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T RemoveReporters(this T o, params StrykerReporter[] v) where T : StrykerSettings => o.Modify(b => b.RemoveCollection(() => o.Reporters, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T RemoveReporters(this T o, IEnumerable v) where T : StrykerSettings => o.Modify(b => b.RemoveCollection(() => o.Reporters, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Reporters))] + public static T ClearReporters(this T o) where T : StrykerSettings => o.Modify(b => b.ClearCollection(() => o.Reporters)); + #endregion + #region OpenReport + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.OpenReport))] + public static T SetOpenReport(this T o, StrykerOpenReport v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.OpenReport, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.OpenReport))] + public static T ResetOpenReport(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.OpenReport)); + #endregion + #region Concurrency + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Concurrency))] + public static T SetConcurrency(this T o, uint? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Concurrency, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Concurrency))] + public static T ResetConcurrency(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Concurrency)); + #endregion + #region BreakAt + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakAt))] + public static T SetBreakAt(this T o, uint? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.BreakAt, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakAt))] + public static T ResetBreakAt(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.BreakAt)); + #endregion + #region ThresholdHigh + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ThresholdHigh))] + public static T SetThresholdHigh(this T o, uint? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.ThresholdHigh, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ThresholdHigh))] + public static T ResetThresholdHigh(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.ThresholdHigh)); + #endregion + #region ThresholdLow + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ThresholdLow))] + public static T SetThresholdLow(this T o, uint? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.ThresholdLow, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.ThresholdLow))] + public static T ResetThresholdLow(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.ThresholdLow)); + #endregion + #region Output + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Output))] + public static T SetOutput(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Output, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Output))] + public static T ResetOutput(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Output)); + #endregion + #region DisableBail + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DisableBail))] + public static T SetDisableBail(this T o, bool? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DisableBail, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DisableBail))] + public static T ResetDisableBail(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.DisableBail)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DisableBail))] + public static T EnableDisableBail(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DisableBail, true)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DisableBail))] + public static T DisableDisableBail(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DisableBail, false)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DisableBail))] + public static T ToggleDisableBail(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DisableBail, !o.DisableBail)); + #endregion + #region WithBaseline + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.WithBaseline))] + public static T SetWithBaseline(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.WithBaseline, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.WithBaseline))] + public static T ResetWithBaseline(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.WithBaseline)); + #endregion + #region Since + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Since))] + public static T SetSince(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Since, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Since))] + public static T ResetSince(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Since)); + #endregion + #region Verbosity + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Verbosity))] + public static T SetVerbosity(this T o, StrykerVerbosity v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Verbosity, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Verbosity))] + public static T ResetVerbosity(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Verbosity)); + #endregion + #region LogToFile + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.LogToFile))] + public static T SetLogToFile(this T o, bool? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.LogToFile, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.LogToFile))] + public static T ResetLogToFile(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.LogToFile)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.LogToFile))] + public static T EnableLogToFile(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.LogToFile, true)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.LogToFile))] + public static T DisableLogToFile(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.LogToFile, false)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.LogToFile))] + public static T ToggleLogToFile(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.LogToFile, !o.LogToFile)); + #endregion + #region DevMode + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DevMode))] + public static T SetDevMode(this T o, bool? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DevMode, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DevMode))] + public static T ResetDevMode(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.DevMode)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DevMode))] + public static T EnableDevMode(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DevMode, true)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DevMode))] + public static T DisableDevMode(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DevMode, false)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DevMode))] + public static T ToggleDevMode(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DevMode, !o.DevMode)); + #endregion + #region Diag + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Diag))] + public static T SetDiag(this T o, bool? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Diag, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Diag))] + public static T ResetDiag(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.Diag)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Diag))] + public static T EnableDiag(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Diag, true)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Diag))] + public static T DisableDiag(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Diag, false)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.Diag))] + public static T ToggleDiag(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.Diag, !o.Diag)); + #endregion + #region DashboardApiKey + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DashboardApiKey))] + public static T SetDashboardApiKey(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.DashboardApiKey, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.DashboardApiKey))] + public static T ResetDashboardApiKey(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.DashboardApiKey)); + #endregion + #region MsBuildPath + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.MsBuildPath))] + public static T SetMsBuildPath(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.MsBuildPath, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.MsBuildPath))] + public static T ResetMsBuildPath(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.MsBuildPath)); + #endregion + #region BreakOnInitialTestFailure + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakOnInitialTestFailure))] + public static T SetBreakOnInitialTestFailure(this T o, bool? v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.BreakOnInitialTestFailure, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakOnInitialTestFailure))] + public static T ResetBreakOnInitialTestFailure(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.BreakOnInitialTestFailure)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakOnInitialTestFailure))] + public static T EnableBreakOnInitialTestFailure(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.BreakOnInitialTestFailure, true)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakOnInitialTestFailure))] + public static T DisableBreakOnInitialTestFailure(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.BreakOnInitialTestFailure, false)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.BreakOnInitialTestFailure))] + public static T ToggleBreakOnInitialTestFailure(this T o) where T : StrykerSettings => o.Modify(b => b.Set(() => o.BreakOnInitialTestFailure, !o.BreakOnInitialTestFailure)); + #endregion + #region TestRunner + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestRunner))] + public static T SetTestRunner(this T o, StrykerTestRunner v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.TestRunner, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.TestRunner))] + public static T ResetTestRunner(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.TestRunner)); + #endregion + #region AzureFileshareSas + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.AzureFileshareSas))] + public static T SetAzureFileshareSas(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.AzureFileshareSas, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.AzureFileshareSas))] + public static T ResetAzureFileshareSas(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.AzureFileshareSas)); + #endregion + #region S3BucketName + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.S3BucketName))] + public static T SetS3BucketName(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.S3BucketName, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.S3BucketName))] + public static T ResetS3BucketName(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.S3BucketName)); + #endregion + #region S3Region + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.S3Region))] + public static T SetS3Region(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.S3Region, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.S3Region))] + public static T ResetS3Region(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.S3Region)); + #endregion + #region S3Endpoint + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.S3Endpoint))] + public static T SetS3Endpoint(this T o, string v) where T : StrykerSettings => o.Modify(b => b.Set(() => o.S3Endpoint, v)); + /// + [Builder(Type = typeof(StrykerSettings), Property = nameof(StrykerSettings.S3Endpoint))] + public static T ResetS3Endpoint(this T o) where T : StrykerSettings => o.Modify(b => b.Remove(() => o.S3Endpoint)); + #endregion +} +#endregion +#region StrykerMutationLevel +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class StrykerMutationLevel : Enumeration +{ + public static StrykerMutationLevel Basic = (StrykerMutationLevel) "Basic"; + public static StrykerMutationLevel Standard = (StrykerMutationLevel) "Standard"; + public static StrykerMutationLevel Advanced = (StrykerMutationLevel) "Advanced"; + public static StrykerMutationLevel Complete = (StrykerMutationLevel) "Complete"; + public static implicit operator StrykerMutationLevel(string value) + { + return new StrykerMutationLevel { Value = value }; + } +} +#endregion +#region StrykerReporter +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class StrykerReporter : Enumeration +{ + public static StrykerReporter All = (StrykerReporter) "All"; + public static StrykerReporter Html = (StrykerReporter) "Html"; + public static StrykerReporter Progress = (StrykerReporter) "Progress"; + public static StrykerReporter Dashboard = (StrykerReporter) "Dashboard"; + public static StrykerReporter Cleartext = (StrykerReporter) "Cleartext"; + public static StrykerReporter CleartextTree = (StrykerReporter) "CleartextTree"; + public static StrykerReporter Dots = (StrykerReporter) "Dots"; + public static StrykerReporter Json = (StrykerReporter) "Json"; + public static implicit operator StrykerReporter(string value) + { + return new StrykerReporter { Value = value }; + } +} +#endregion +#region StrykerOpenReport +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class StrykerOpenReport : Enumeration +{ + public static StrykerOpenReport Html = (StrykerOpenReport) "Html"; + public static StrykerOpenReport Dashboard = (StrykerOpenReport) "Dashboard"; + public static implicit operator StrykerOpenReport(string value) + { + return new StrykerOpenReport { Value = value }; + } +} +#endregion +#region StrykerVerbosity +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class StrykerVerbosity : Enumeration +{ + public static StrykerVerbosity Error = (StrykerVerbosity) "Error"; + public static StrykerVerbosity Warning = (StrykerVerbosity) "Warning"; + public static StrykerVerbosity Info = (StrykerVerbosity) "Info"; + public static StrykerVerbosity Debug = (StrykerVerbosity) "Debug"; + public static StrykerVerbosity Trace = (StrykerVerbosity) "Trace"; + public static implicit operator StrykerVerbosity(string value) + { + return new StrykerVerbosity { Value = value }; + } +} +#endregion +#region StrykerTestRunner +/// Used within . +[Serializable] +[ExcludeFromCodeCoverage] +[TypeConverter(typeof(TypeConverter))] +public partial class StrykerTestRunner : Enumeration +{ + public static StrykerTestRunner vstest = (StrykerTestRunner) "vstest"; + public static StrykerTestRunner mtp = (StrykerTestRunner) "mtp"; + public static implicit operator StrykerTestRunner(string value) + { + return new StrykerTestRunner { Value = value }; + } +} +#endregion diff --git a/src/Fallout.Common/Tools/Stryker/Stryker.json b/src/Fallout.Common/Tools/Stryker/Stryker.json index 0215f1741..f3863f3e2 100644 --- a/src/Fallout.Common/Tools/Stryker/Stryker.json +++ b/src/Fallout.Common/Tools/Stryker/Stryker.json @@ -1,214 +1,266 @@ { - "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", - "references": [ - "https://raw.githubusercontent.com/stryker-mutator/stryker-net/master/src/Stryker.CLI/Stryker.CLI/Program.cs" - ], - "name": "Stryker", - "officialUrl": "https://stryker-mutator.io/docs/stryker-net/configuration", - "help": "Stryker.NET offers you mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet. New to Stryker.NET? Begin with our guide on getting started", - "nugetPackageId": "dotnet-stryker", - "packageExecutable": "Stryker.CLI.dll", - "customLogger": true, - "tasks": [ - { - "settingsClass": { - "properties": [ - { - "name": "ConfigFile", - "type": "string", - "format": "--config-file {value}", - "default": "\"stryker-config.json\"", - "help": "Path / Name of the configuration file. You can specify a custom path to the config file. For example if you want to add the stryker config section to your appsettings file. The section should still be called stryker-config." - }, - { - "name": "Solution", - "type": "string", - "format": "--solution {value}", - "help": "The solution path can be supplied to help with dependency resolution. If stryker is ran from the solution file location the solution file will be analyzed and all projects in the solution will be tested by stryker." - }, - { - "name": "Project", - "type": "string", - "format": "--project {value}", - "help": "The project file name is required when your test project has more than one project reference. Stryker can currently mutate one project under test for 1..N test projects but not 1..N projects under test for one test project.
Do not pass a path to this option. Pass the project file name as it appears in your test project's references" - }, - { - "name": "TestProjects", - "type": "List", - "format": "--test-project {value}", - "help": "When you have multiple test projects covering one project under test you may specify all relevant test projects in the config file. You must run stryker from the project under test instead of the test project directory when using multiple test projects." - }, - { - "name": "Mutate", - "type": "List", - "format": "--mutate {value}", - "help": "

With mutate you configure the subset of files to use for mutation testing. Only source files part of your project will be taken into account. When this option is not specified the whole project will be mutated. You can add an ! in front of the pattern to exclude instead of include matching files. This can be used to for example ignore generated files while mutating.

When only exclude patterns are provided, all files will be included that do not match any exclude pattern. If both include and exclude patterns are provided, only the files that match an include pattern but not also an exclude pattern will be included. The order of the patterns is irrelevant.

The patterns support globbing syntax to allow wildcards.

Example :

PatternsFileWill be mutated
nullMyFolder/MyFactory.csYes
'**/*.*'MyFolder/MyFactory.csYes
'!**/MyFactory.cs'MyFolder/MyFactory.csNo

To allow more fine-grained filtering you can also specify the span of text that should be in- or excluded. A span is defined by the indices of the first character and the last character. dotnet stryker -m \"MyFolder/MyService.cs{10..100}\"

" - }, - { - "name": "Configuration", - "type": "string", - "format": "--configuration {value}", - "help": "Allows you to specify the build configuration to use when building the project. This can be useful when you want to test the release build of your project." - }, - { - "name": "TargetFramework", - "type": "string", - "format": "--target-framework {value}", - "help": "Randomly selected. If the project targets multiple frameworks, this way you can specify the particular framework to build against. If you specify a non-existent target, Stryker will build the project against a random one (or the only one if so)." - }, - { - "name": "ProjectInfoVersion", - "type": "string", - "format": "--version {value}", - "help": "The version of the report. This should be filled with the branch name, git tag or git sha (although no validation is done). You can override a report of a specific version, like docker tags. Slashes in the version should not be encoded. For example, it's valid to use \"feat/logging\"." - }, - { - "name": "MutationLevel", - "type": "StrykerMutationLevel", - "default": "StrykerMutationLevel.Standard", - "help": "Stryker supports multiple mutation levels. Each level comes with a specific set of mutations. Each level contains the mutations of the levels below it. By setting the level to Complete you will get all possible mutations and thus the strictest mutation test. This comes at the price of longer runtime as more mutations will be generated and tested." - }, - { - "name": "Reporters", - "type": "List", - "format": "--reporter {value}", - "default": "new List() { StrykerReporter.Html, StrykerReporter.Progress }" - }, - { - "name": "OpenReport", - "type": "StrykerOpenReport", - "format": "--open-report:{value}", - "default": "StrykerOpenReport.Html", - "help": "When this option is passed, generated reports should open in the browser automatically once Stryker starts testing mutants, and will update the report till Stryker is done. Both html and dashboard reports can be opened automatically." - }, - { - "name": "Concurrency", - "type": "uint", - "format": "--concurrency {value}", - "help": "Change the amount of concurrent workers Stryker uses for the mutation testrun. Defaults to using half your logical (virtual) processor count.

Example: an intel i7 quad-core with hyperthreading has 8 logical cores and 4 physical cores. Stryker will use 4 concurrent workers when using the default.

" - }, - { - "name": "BreakAt", - "type": "uint", - "format": "--break-at {value}", - "default": "0", - "help": "Must be less than or equal to threshold low. When threshold break is set to anything other than 0 and the mutation score is lower than the threshold Stryker will exit with a non-zero code. This can be used in a CI pipeline to fail the pipeline when your mutation score is not sufficient." - }, - { - "name": "ThresholdHigh", - "type": "uint", - "format": "--threshold-high {value}", - "default": "80", - "help": "Minimum good mutation score. Must be higher than or equal to threshold low. Must be higher than 0." - }, - { - "name": "ThresholdLow", - "type": "uint", - "format": "--threshold-low {value}", - "default": "60", - "help": "Minimum acceptable mutation score. Must be less than or equal to threshold high and more than or equal to threshold break." - }, - { - "name": "Output", - "type": "string", - "format": "--output {value}", - "help": "Changes the output path for Stryker logs and reports. This can be an absolute or relative path." - }, - { - "name": "DisableBail", - "type": "bool", - "format": "--disable-bail", - "help": "Stryker aborts a unit testrun for a mutant as soon as one test fails because this is enough to confirm the mutant is killed. This can reduce the total runtime but also means you miss information about individual unit tests (e.g. if a unit test does not kill any mutants and is therefore useless). You can disable this behavior and run all unit tests for a mutant to completion. This can be especially useful when you want to find useless unit tests." - }, - { - "name": "Since", - "type": "string", - "format": "--since:{value}", - "help": "

Use git information to test only code changes since the given target. Stryker will only report on mutants within the changed code. All other mutants will not have a result.

If you wish to test only changed sources and tests but would like to have a complete mutation report see with-baseline.

Set the diffing target on the command line by passing a committish with the since flag in the format --since:. Set the diffing target in the config file by setting the since target option.

* For changes on test project files all mutants covered by tests in that file will be seen as changed.

" - }, - { - "name": "Verbosity", - "type": "StrykerVerbosity", - "format": "--verbosity {value}", - "default": "StrykerVerbosity.Trace", - "help": "Change the console verbosity of Stryker when you want more or less details about the mutation testrun." - }, - { - "name": "LogToFile", - "type": "bool", - "format": "--log-to-file", - "noArgument": true, - "help": "When creating an issue on github you can include a logfile so the issue can be diagnosed easier.

File logging always uses loglevel trace.

" - }, - { - "name": "DevMode", - "type": "bool", - "format": "--dev-mode", - "noArgument": true, - "help": "Stryker will not gracefully recover from compilation errors, but instead crash immediately. Used during development to quickly diagnose errors.

Also enables more debug logs not generally useful to normal users.

" - }, - { - "name": "DashboardApiKey", - "type": "string", - "format": "--dashboard-api-key {value}", - "help": "The API key for authentication with the Stryker dashboard.
Get your api key at the stryker dashboard. To keep your api key safe, store it in an encrypted variable in your pipeline." - }, - { - "name": "MsBuildPath", - "type": "string", - "format": "--msbuild-path {value}", - "help": "By default, Stryker tries to auto-discover msbuild on your system. If Stryker fails to discover msbuild you may supply the path to msbuild manually with this option." - }, - { - "name": "BreakOnInitialTestFailure", - "type": "bool", - "format": "--break-on-initial-test-failure", - "noArgument": true, - "help": "Instruct Stryker to break execution when at least one test failed on initial test run." - } - ] - } - } - ], - "enumerations": [ - { - "name": "StrykerMutationLevel", - "values": [ - "Basic", - "Standard", - "Advanced", - "Complete" - ] - }, - { - "name": "StrykerReporter", - "values": [ - "All", - "Html", - "Progress", - "Dashboard", - "Cleartext", - "CleartextTree", - "Dots", - "Json" - ] - }, - { - "name": "StrykerOpenReport", - "values": [ - "Html", - "Dashboard" - ] - }, - { - "name": "StrykerVerbosity", - "values": [ - "Error", - "Warning", - "Info", - "Debug", - "Trace" - ] - } - ] -} \ No newline at end of file + "$schema": "https://raw.githubusercontent.com/Fallout-build/Fallout/main/src/Fallout.Tooling.Generator/schema.json", + "references": [ + "https://raw.githubusercontent.com/stryker-mutator/stryker-net/master/src/Stryker.CLI/Stryker.CLI/Program.cs" + ], + "name": "Stryker", + "officialUrl": "https://stryker-mutator.io/docs/stryker-net/configuration", + "help": "Stryker.NET offers you mutation testing for your .NET Core and .NET Framework projects. It allows you to test your tests by temporarily inserting bugs. Stryker.NET is installed using NuGet. New to Stryker.NET? Begin with our guide on getting started", + "nugetPackageId": "dotnet-stryker", + "packageExecutable": "Stryker.CLI.dll", + "customLogger": true, + "tasks": [ + { + "settingsClass": { + "properties": [ + { + "name": "ConfigFile", + "type": "string", + "format": "--config-file {value}", + "default": "\"stryker-config.json\"", + "help": "Path / Name of the configuration file. You can specify a custom path to the config file. For example if you want to add the stryker config section to your appsettings file. The section should still be called stryker-config." + }, + { + "name": "Solution", + "type": "string", + "format": "--solution {value}", + "help": "The solution path can be supplied to help with dependency resolution. If stryker is ran from the solution file location the solution file will be analyzed and all projects in the solution will be tested by stryker." + }, + { + "name": "Project", + "type": "string", + "format": "--project {value}", + "help": "The project file name is required when your test project has more than one project reference. Stryker can currently mutate one project under test for 1..N test projects but not 1..N projects under test for one test project.
Do not pass a path to this option. Pass the project file name as it appears in your test project's references" + }, + { + "name": "TestProjects", + "type": "List", + "format": "--test-project {value}", + "help": "When you have multiple test projects covering one project under test you may specify all relevant test projects in the config file. You must run stryker from the project under test instead of the test project directory when using multiple test projects." + }, + { + "name": "Mutate", + "type": "List", + "format": "--mutate {value}", + "help": "

With mutate you configure the subset of files to use for mutation testing. Only source files part of your project will be taken into account. When this option is not specified the whole project will be mutated. You can add an ! in front of the pattern to exclude instead of include matching files. This can be used to for example ignore generated files while mutating.

When only exclude patterns are provided, all files will be included that do not match any exclude pattern. If both include and exclude patterns are provided, only the files that match an include pattern but not also an exclude pattern will be included. The order of the patterns is irrelevant.

The patterns support globbing syntax to allow wildcards.

Example :

PatternsFileWill be mutated
nullMyFolder/MyFactory.csYes
'**/*.*'MyFolder/MyFactory.csYes
'!**/MyFactory.cs'MyFolder/MyFactory.csNo

To allow more fine-grained filtering you can also specify the span of text that should be in- or excluded. A span is defined by the indices of the first character and the last character. dotnet stryker -m \"MyFolder/MyService.cs{10..100}\"

" + }, + { + "name": "Configuration", + "type": "string", + "format": "--configuration {value}", + "help": "Allows you to specify the build configuration to use when building the project. This can be useful when you want to test the release build of your project." + }, + { + "name": "TargetFramework", + "type": "string", + "format": "--target-framework {value}", + "help": "Randomly selected. If the project targets multiple frameworks, this way you can specify the particular framework to build against. If you specify a non-existent target, Stryker will build the project against a random one (or the only one if so)." + }, + { + "name": "ProjectInfoVersion", + "type": "string", + "format": "--version {value}", + "help": "The version of the report. This should be filled with the branch name, git tag or git sha (although no validation is done). You can override a report of a specific version, like docker tags. Slashes in the version should not be encoded. For example, it's valid to use \"feat/logging\"." + }, + { + "name": "MutationLevel", + "type": "StrykerMutationLevel", + "format": "--mutation-level {value}", + "default": "StrykerMutationLevel.Standard", + "help": "Stryker supports multiple mutation levels. Each level comes with a specific set of mutations. Each level contains the mutations of the levels below it. By setting the level to Complete you will get all possible mutations and thus the strictest mutation test. This comes at the price of longer runtime as more mutations will be generated and tested." + }, + { + "name": "Reporters", + "type": "List", + "format": "--reporter {value}", + "default": "new List() { StrykerReporter.Html, StrykerReporter.Progress }" + }, + { + "name": "OpenReport", + "type": "StrykerOpenReport", + "format": "--open-report:{value}", + "default": "StrykerOpenReport.Html", + "help": "When this option is passed, generated reports should open in the browser automatically once Stryker starts testing mutants, and will update the report till Stryker is done. Both html and dashboard reports can be opened automatically." + }, + { + "name": "Concurrency", + "type": "uint", + "format": "--concurrency {value}", + "help": "Change the amount of concurrent workers Stryker uses for the mutation testrun. Defaults to using half your logical (virtual) processor count.

Example: an intel i7 quad-core with hyperthreading has 8 logical cores and 4 physical cores. Stryker will use 4 concurrent workers when using the default.

" + }, + { + "name": "BreakAt", + "type": "uint", + "format": "--break-at {value}", + "default": "0", + "help": "Must be less than or equal to threshold low. When threshold break is set to anything other than 0 and the mutation score is lower than the threshold Stryker will exit with a non-zero code. This can be used in a CI pipeline to fail the pipeline when your mutation score is not sufficient." + }, + { + "name": "ThresholdHigh", + "type": "uint", + "format": "--threshold-high {value}", + "default": "80", + "help": "Minimum good mutation score. Must be higher than or equal to threshold low. Must be higher than 0." + }, + { + "name": "ThresholdLow", + "type": "uint", + "format": "--threshold-low {value}", + "default": "60", + "help": "Minimum acceptable mutation score. Must be less than or equal to threshold high and more than or equal to threshold break." + }, + { + "name": "Output", + "type": "string", + "format": "--output {value}", + "help": "Changes the output path for Stryker logs and reports. This can be an absolute or relative path." + }, + { + "name": "DisableBail", + "type": "bool", + "format": "--disable-bail", + "help": "Stryker aborts a unit testrun for a mutant as soon as one test fails because this is enough to confirm the mutant is killed. This can reduce the total runtime but also means you miss information about individual unit tests (e.g. if a unit test does not kill any mutants and is therefore useless). You can disable this behavior and run all unit tests for a mutant to completion. This can be especially useful when you want to find useless unit tests." + }, + { + "name": "WithBaseline", + "type": "string", + "format": "--with-baseline:{value}", + "help": "Enabling with-baseline saves the mutation report to a storage location such as the filesystem. The mutation report is loaded at the start of the next mutation run. Any changed source code or unit test results in a reset of the mutants affected by the change. For unchanged mutants the previous result is reused. This feature expands on the since feature by providing you with a full report after a partial mutation testrun." + }, + { + "name": "Since", + "type": "string", + "format": "--since:{value}", + "help": "

Use git information to test only code changes since the given target. Stryker will only report on mutants within the changed code. All other mutants will not have a result.

If you wish to test only changed sources and tests but would like to have a complete mutation report see with-baseline.

Set the diffing target on the command line by passing a committish with the since flag in the format --since:. Set the diffing target in the config file by setting the since target option.

* For changes on test project files all mutants covered by tests in that file will be seen as changed.

" + }, + { + "name": "Verbosity", + "type": "StrykerVerbosity", + "format": "--verbosity {value}", + "default": "StrykerVerbosity.Trace", + "help": "Change the console verbosity of Stryker when you want more or less details about the mutation testrun." + }, + { + "name": "LogToFile", + "type": "bool", + "format": "--log-to-file", + "noArgument": true, + "help": "When creating an issue on github you can include a logfile so the issue can be diagnosed easier.

File logging always uses loglevel trace.

" + }, + { + "name": "DevMode", + "type": "bool", + "format": "--dev-mode", + "noArgument": true, + "help": "Stryker will not gracefully recover from compilation errors, but instead crash immediately. Used during development to quickly diagnose errors.

Also enables more debug logs not generally useful to normal users.

" + }, + { + "name": "Diag", + "type": "bool", + "format": "--diag", + "noArgument": true, + "help": "Enable diagnostic logging. This option produces verbose diagnostic output that is useful for troubleshooting problems or when reporting issues." + }, + { + "name": "DashboardApiKey", + "type": "string", + "format": "--dashboard-api-key {value}", + "help": "The API key for authentication with the Stryker dashboard.
Get your api key at the stryker dashboard. To keep your api key safe, store it in an encrypted variable in your pipeline." + }, + { + "name": "MsBuildPath", + "type": "string", + "format": "--msbuild-path {value}", + "help": "By default, Stryker tries to auto-discover msbuild on your system. If Stryker fails to discover msbuild you may supply the path to msbuild manually with this option." + }, + { + "name": "BreakOnInitialTestFailure", + "type": "bool", + "format": "--break-on-initial-test-failure", + "noArgument": true, + "help": "Instruct Stryker to break execution when at least one test failed on initial test run." + }, + { + "name": "TestRunner", + "type": "StrykerTestRunner", + "format": "--test-runner {value}", + "default": "vstest", + "help": "Specifies the test runner to use for executing tests during mutation testing.

Available options:

  • vstest - The traditional Visual Studio Test Platform runner (default)
  • mtp - The Microsoft Test Platform runner (preview)


The MTP test runner is a modern alternative that provides better performance in certain scenarios and supports newer testing frameworks like TUnit. However, it's still in preview and may have limitations compared to the VsTest runner." + }, + { + "name": "AzureFileshareSas", + "type": "string", + "format": "--azure-fileshare-sas {value}", + "help": "When using the azure file storage provider you must pass credentials for the fileshare to Stryker. For authentication with the azure fileshare we support Shared Access Signatures (SAS).

The SAS should be configured with the following properties:

Allowed services:
Allowed resource types:
ContainerObject

Allowed permissions:
Read
,
Write
,
Create


For more information on how to configure a SAS check the Azure documentation." + }, + { + "name": "S3BucketName", + "type": "string", + "format": "--s3-bucket-name {value}", + "help": "When using the S3 provider you must set the bucket name where baselines will be stored.

The baseline reports are stored under the key
StrykerOutput//stryker-report.json
within the bucket by default. If a project name is set, the key becomes
StrykerOutput///stryker-report.json
." + }, + { + "name": "S3Region", + "type": "string", + "format": "--s3-region {value}", + "help": "When using the S3 provider, setting the region is optional. If not set, the AWS SDK resolves the region using its default configuration chain (for example environment variables or shared profiles)." + }, + { + "name": "S3Endpoint", + "type": "string", + "format": "--s3-endpoint {value}", + "help": "When using a non-AWS S3-compatible service (e.g. MinIO, Backblaze B2) you can set a custom endpoint URL. This is optional; when not set the default AWS S3 endpoint is used.

Authentication uses the default AWS credential resolution chain (environment variables, shared credentials file, IAM role, etc.). For non-AWS services, set
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
environment variables." + } + ] + } + } + ], + "enumerations": [ + { + "name": "StrykerMutationLevel", + "values": [ + "Basic", + "Standard", + "Advanced", + "Complete" + ] + }, + { + "name": "StrykerReporter", + "values": [ + "All", + "Html", + "Progress", + "Dashboard", + "Cleartext", + "CleartextTree", + "Dots", + "Json" + ] + }, + { + "name": "StrykerOpenReport", + "values": [ + "Html", + "Dashboard" + ] + }, + { + "name": "StrykerVerbosity", + "values": [ + "Error", + "Warning", + "Info", + "Debug", + "Trace" + ] + }, + { + "name": "StrykerTestRunner", + "values": [ + "vstest", + "mtp" + ] + } + ] +}