feat(baseline): Allow force creating fresh baseline#2124
feat(baseline): Allow force creating fresh baseline#2124richardwerkman wants to merge 43 commits intomasterfrom
Conversation
…references
- Full baseline is never generated because since filter marks mutations as ignored due to not being unchanged compared to target #1803
- stryker-mutator/stryker-net#1803 (comment)
- feat(baseline): Allow force creating fresh baseline #2124
- stryker-mutator/stryker-net#2124
… into baseline-command
* chore(deps): update dependency buildalyzer to v5.0.1 (#2665) * chore(deps): update dependency buildalyzer to v5.0.1 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore: fix page links for site * fix: Don't fail the test run if restoring test assemblies fails (#2664) * chore(deps): update xunit-dotnet monorepo to v2.5.1 (#2673) * chore(deps): update xunit-dotnet monorepo to v2.5.1 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.4.0 (#2677) * chore(deps): update dependency yamldotnet to v13.4.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore: F# range math (#2679) * F# range math * Windows x Linux * Up * chore: Passing Stryker options to F# project components (#2680) Co-authored-by: Rouke Broersma <mobrockers@gmail.com> * fix: Use solution file when it's available (#2690) * Use solution file when it's available * fix unit test * sonarqube * chore(compilation): Improve Error and Trace Logging (#2688) Add logs Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * fix: Remove usings from MutantControl (#2694) chore: remove usings from MutantControl Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * chore: Code quality improvements (#2696) * Use string builder in loop * Use find & handle other platform newlines * Use find * Fix duplicate message * Add more range tests * Improve range code * docs: add SAS configuration (#2676) (#2701) docs: add SAS configuration * chore(deps): update dependency launchdarkly.eventsource to v5.1.0 (#2702) * chore(deps): update dependency launchdarkly.eventsource to v5.1.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.5.0 (#2703) * chore(deps): update dependency yamldotnet to v13.5.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.5.1 (#2704) * chore(deps): update dependency yamldotnet to v13.5.1 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.7.0 (#2705) * chore(deps): update dependency yamldotnet to v13.7.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update xunit-dotnet monorepo (#2711) * chore(deps): update xunit-dotnet monorepo * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore: Breaking down FilePattern (#2681) * Simplifying DiffIgnoreChangesInput * Update FilePattern.cs * Up * up * Rename the class * up --------- Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * chore: Splitting some C# related extensions in a separate file (#2697) Splitting some C# related extensions in a separate file Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * fix: tests for `OpenReportEnabledInput` help text * fix: typo in re(c)reate * add: tests for baseline target input. change: target input default to 'master' to stay consistent with since target input. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> Co-authored-by: Rouke Broersma <mobrockers@gmail.com> Co-authored-by: Pent Ploompuu <kaalikas@gmail.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> Co-authored-by: Jack Steel <jacksteel@jacksteel.co.uk> Co-authored-by: Cyrille DUPUYDAUBY <dupdob@gmail.com> Co-authored-by: Max S <max.schwerdtner@gmail.com>
* chore(deps): update dependency buildalyzer to v5.0.1 (#2665) * chore(deps): update dependency buildalyzer to v5.0.1 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore: fix page links for site * fix: Don't fail the test run if restoring test assemblies fails (#2664) * chore(deps): update xunit-dotnet monorepo to v2.5.1 (#2673) * chore(deps): update xunit-dotnet monorepo to v2.5.1 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.4.0 (#2677) * chore(deps): update dependency yamldotnet to v13.4.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore: F# range math (#2679) * F# range math * Windows x Linux * Up * chore: Passing Stryker options to F# project components (#2680) Co-authored-by: Rouke Broersma <mobrockers@gmail.com> * fix: Use solution file when it's available (#2690) * Use solution file when it's available * fix unit test * sonarqube * chore(compilation): Improve Error and Trace Logging (#2688) Add logs Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * fix: Remove usings from MutantControl (#2694) chore: remove usings from MutantControl Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * chore: Code quality improvements (#2696) * Use string builder in loop * Use find & handle other platform newlines * Use find * Fix duplicate message * Add more range tests * Improve range code * docs: add SAS configuration (#2676) (#2701) docs: add SAS configuration * chore(deps): update dependency launchdarkly.eventsource to v5.1.0 (#2702) * chore(deps): update dependency launchdarkly.eventsource to v5.1.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.5.0 (#2703) * chore(deps): update dependency yamldotnet to v13.5.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.5.1 (#2704) * chore(deps): update dependency yamldotnet to v13.5.1 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update dependency yamldotnet to v13.7.0 (#2705) * chore(deps): update dependency yamldotnet to v13.7.0 * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore(deps): update xunit-dotnet monorepo (#2711) * chore(deps): update xunit-dotnet monorepo * Update package lock files --------- Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> * chore: Breaking down FilePattern (#2681) * Simplifying DiffIgnoreChangesInput * Update FilePattern.cs * Up * up * Rename the class * up --------- Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * chore: Splitting some C# related extensions in a separate file (#2697) Splitting some C# related extensions in a separate file Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> * fix: tests for `OpenReportEnabledInput` help text * fix: typo in re(c)reate * add: tests for baseline target input. change: target input default to 'master' to stay consistent with since target input. * fix: cli info text test * also check if WithBaselineInput is true --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovatebot <renovatebot@stryker-mutator.io> Co-authored-by: Rouke Broersma <mobrockers@gmail.com> Co-authored-by: Pent Ploompuu <kaalikas@gmail.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Rouke Broersma <rouke.broersma@infosupport.com> Co-authored-by: Jack Steel <jacksteel@jacksteel.co.uk> Co-authored-by: Cyrille DUPUYDAUBY <dupdob@gmail.com> Co-authored-by: Max S <max.schwerdtner@gmail.com>
|
Kudos, SonarCloud Quality Gate passed! |
* fix: tests for `OpenReportEnabledInput` help text * fix: typo in re(c)reate * add: tests for baseline target input. change: target input default to 'master' to stay consistent with since target input. * fix: cli info text test * also check if WithBaselineInput is true * re-add all options to baseline and recreate commands
src/Stryker.Core/Stryker.Core/Mutators/NullCoalescingExpressionMutator.cs
Outdated
Show resolved
Hide resolved
| /// <summary> | ||
| /// When true, a new baseline should be created. | ||
| /// </summary> | ||
| public bool BaselineRecreateEnabled { get; init; } |
There was a problem hiding this comment.
| public bool BaselineRecreateEnabled { get; init; } | |
| public bool RecreateBaseline { get; init; } |
|
docs/configuration.md
Outdated
|
|
||
| ### `baseline` <`command`> | ||
| ### `with-baseline` <`committish`> | ||
|
|
There was a problem hiding this comment.
Why does not still need to be a committish? We are trying to move away from git for baseline.
|
|
||
| If you wish to test only changed sources and tests but would like to have a complete mutation report see [with-baseline](#with-baseline-flag-committish). | ||
| If you wish to test only changed sources and tests but would like to have a complete mutation report see [with-baseline](#with-baseline-committish). | ||
|
|
There was a problem hiding this comment.
| ### `with-baseline` <`committish`> | |
| ### `baseline` <`target-version`> |
docs/configuration.md
Outdated
| *\* The baseline and since features are mutually exclusive. This feature implicitly enables the [since](#since-flag-committish) feature for now.* | ||
|
|
||
| ### `baseline.fallback-version` <`string`> | ||
|
|
There was a problem hiding this comment.
| When [with-baseline](#with-baseline-committish) is enabled and Stryker cannot find an existing report for the current branch the fallback version is used. When Stryker is still unable to find a baseline we will do a complete instead of partial testrun. The complete testrun will then be saved as the new baseline for the next mutation testrun. | |
| When [baseline](#baseline-target-version) is enabled and Stryker cannot find an existing report for the current version the fallback version is used. When Stryker is still unable to find a baseline with either the current version or the fallback version a complete testrun is performed. The complete testrun will then be saved as the new baseline for the next mutation testrun. |
docs/configuration.md
Outdated
|
|
||
| ## Baseline | ||
|
|
There was a problem hiding this comment.
| Default: `false` | |
| Command line: `with-baseline feat-2` | |
| Config file: `"baseline": { }` | |
| Default: `false` | |
| Command: `baseline feat-2` | |
| Command Alias: `with-baseline feat-2` | |
| Config file: `"baseline": { }` |
| RegisterCliInputs(baselineCmd); | ||
|
|
||
| var committishArg = baselineCmd.Argument("committish", "The committish to compare with the current HEAD. This can be a branch, tag or commit id."); | ||
| committishArg.IsRequired(true); |
There was a problem hiding this comment.
Are we not using a default target version anymore?
|
|
Is there any update on this PR? These issues are still outstanding it seems and it would be nice to be able to use the baseline feature |











resolves #1560
resolves #2823
resolves #2847
--targetoption and replace with an extra argument for baseline commandThe new commands now work as follows:
dotnet stryker with-baseline maindotnet stryker with-baseline main recreateor
dotnet stryker baseline maindotnet stryker baseline main recreate