-
Notifications
You must be signed in to change notification settings - Fork 188
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
feat(baseline): Allow force creating fresh baseline #2124
base: master
Are you sure you want to change the base?
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>
…/stryker-net into baseline-command
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public bool BaselineRecreateEnabled { get; init; } | |
public bool RecreateBaseline { get; init; } |
…/stryker-net into baseline-command
Quality Gate passedIssues Measures |
|
||
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](#since-flag-committish) feature by providing you with a full report after a partial mutation testrun. | ||
Enabling `baseline`, alias `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](#since-flag-committish) feature by providing you with a full report after a partial mutation testrun. The target of the baseline is a `committish` passed as an extra argument. The target determines which committish is used to establish or locate a baseline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does not still need to be a committish? We are trying to move away from git for baseline.
@@ -492,33 +492,26 @@ Use [globbing syntax](https://en.wikipedia.org/wiki/Glob_(programming)) for wild | |||
|
|||
## Baseline | |||
|
|||
### `baseline` <`command`> | |||
### `with-baseline` <`committish`> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### `with-baseline` <`committish`> | |
### `baseline` <`target-version`> |
|
||
When [with-baseline](#with-baseline-flag-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 [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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Default: `false` | ||
Command line: `with-baseline feat-2` | ||
Config file: `"baseline": { }` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not using a default target version anymore?
Quality Gate passedIssues Measures |
resolves #1560
resolves #2823
resolves #2847
--target
option and replace with an extra argument for baseline commandThe new commands now work as follows:
dotnet stryker with-baseline main
dotnet stryker with-baseline main recreate
or
dotnet stryker baseline main
dotnet stryker baseline main recreate