Skip to content

fix: restore in Debug before running the mutation tests - #1049

Merged
vbreuss merged 1 commit into
mainfrom
fix/restore-debug-before-mutation-tests
Sep 12, 2026
Merged

vbreuss merged 1 commit into
mainfrom
fix/restore-debug-before-mutation-tests

Conversation

@vbreuss

@vbreuss vbreuss commented Sep 12, 2026

Copy link
Copy Markdown
Member

The Compile target restores the solution for Release, where aweXpect references the released aweXpect.Core package instead of the project. Stryker resolves the project references during its analysis phase, before it builds the solution in Debug, so it picked up both the package and the project output and failed to compile the mutants with CS0433:

The type 'ExpectationGrammars' exists in both
'aweXpect.Core, Version=2.36.0.0' and 'aweXpect.Core, Version=255.255.255.255'

Restoring for Debug up front makes the analysis see the project references only. This affects both MutationTestsMain and MutationTestsCore, which share ExecuteMutationTest.

The `Compile` target restores the solution for `Release`, where `aweXpect`
references the released `aweXpect.Core` package instead of the project.
Stryker resolves the project references during its analysis phase, before it
builds the solution in `Debug`, so it picked up both the package and the
project output and failed to compile the mutants with CS0433:

    The type 'ExpectationGrammars' exists in both
    'aweXpect.Core, Version=2.36.0.0' and 'aweXpect.Core, Version=255.255.255.255'

Restoring for `Debug` up front makes the analysis see the project references
only. This affects both `MutationTestsMain` and `MutationTestsCore`, which
share `ExecuteMutationTest`.

Verified with dotnet-stryker 5.0.0: fails before the change, completes after.
@vbreuss vbreuss self-assigned this Sep 12, 2026
Copilot AI lite review requested due to automatic review settings September 12, 2026 17:01
@vbreuss vbreuss added the bug Something isn't working label Sep 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

     23 files   -  27       23 suites   - 27   9m 41s ⏱️ + 1m 9s
 20 240 tests  -  35   20 238 ✅  -  35  2 💤 ±0  0 ❌ ±0 
104 657 runs   - 108  104 655 ✅  - 108  2 💤 ±0  0 ❌ ±0 

Results for commit dc8b778. ± Comparison against base commit 1c48f22.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 9V74 3.67GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 8.0.31 (8.0.31, 8.0.3126.42015), X64 RyuJIT x86-64-v4

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Bool_aweXpect 191.9 ns 1.44 ns 1.27 ns 0.0415 - 696 B
Bool_FluentAssertions 191.7 ns 1.58 ns 1.40 ns 0.0567 - 952 B
Equivalency_aweXpect 219,709.7 ns 1,523.34 ns 1,350.40 ns 20.0195 0.9766 335442 B
Equivalency_FluentAssertions 1,786,668.6 ns 14,402.77 ns 12,026.97 ns 289.0625 50.7813 4841647 B
Int_GreaterThan_aweXpect 193.8 ns 0.89 ns 0.83 ns 0.0515 - 864 B
Int_GreaterThan_FluentAssertions 196.5 ns 2.20 ns 2.06 ns 0.0730 - 1224 B
ItemsCount_AtLeast_aweXpect 358.3 ns 4.41 ns 3.69 ns 0.0811 - 1360 B
ItemsCount_AtLeast_FluentAssertions 375.8 ns 3.91 ns 3.46 ns 0.1197 - 2008 B
String_aweXpect 366.1 ns 1.48 ns 1.38 ns 0.0672 - 1128 B
String_FluentAssertions 900.1 ns 4.43 ns 4.14 ns 0.2356 0.0010 3944 B
StringArray_aweXpect 1,398.8 ns 5.34 ns 4.46 ns 0.1564 - 2624 B
StringArray_FluentAssertions 983.6 ns 7.39 ns 6.55 ns 0.2480 - 4152 B
StringArrayInAnyOrder_aweXpect 1,882.4 ns 4.00 ns 3.54 ns 0.1678 - 2816 B
StringArrayInAnyOrder_FluentAssertions 15,049.6 ns 29.84 ns 24.92 ns 1.9836 0.0610 33471 B

@github-actions

Copy link
Copy Markdown
Contributor

👽 Mutation Results

Mutation testing badge

aweXpect

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Runtime Errors Total Detected Total Undetected Total Mutants

The final mutation score is NaN%

Coverage Thresholds: high:80 low:60 break:0

aweXpect.Core

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Runtime Errors Total Detected Total Undetected Total Mutants

The final mutation score is NaN%

Coverage Thresholds: high:80 low:60 break:0

@vbreuss
vbreuss merged commit ae28ac8 into main Sep 12, 2026
14 checks passed
@vbreuss
vbreuss deleted the fix/restore-debug-before-mutation-tests branch September 12, 2026 17:13
github-actions Bot added a commit that referenced this pull request Sep 12, 2026
github-actions Bot added a commit that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants