You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our tests use xUnit v2 (xunit 2.9.3). The v2 line is effectively frozen, and the ecosystem around it is moving to v3:
Verify — v33 dropped Verify.Xunit (v2) in favour of Verify.XunitV3, so we're stuck on Verify.Xunit 31.x. One visible symptom: Verify 31.x has no net11.0 build, so net11 tests load its net10 build and received snapshot files get named *.DotNet11_0.DotNet10_0.received.txt (Namer.cs @ 31.12.5 vs @ 33.0.1, which adds NET11_0). Cosmetic today, but we'll keep missing fixes like this.
Native AOT — xUnit v3 supports Native AOT as of 4.0, via xunit.v3.aot and source generators (docs). Can we run unit tests in AOT? #3930 assumed xUnit couldn't do AOT and pointed at TUnit; v3 removes the test framework itself as the blocker, though NSubstitute and Verify serialisation still are.
Scope
Packages — xunit → xunit.v3, Verify.Xunit → Verify.XunitV3, xunit.runner.visualstudio to a v3-compatible version (test/Directory.Build.props).
Test projects become executables — about 24 *.Tests projects.
Xunit.Abstractions is gone — ITestOutputHelper moves namespace. It's used in about 54 files, including the global <Using Include="Xunit.Abstractions" />.
Xunit.SkippableFact doesn't support v3 — about 36 files use [SkippableFact]/[SkippableTheory]/Skip.If. v3 has dynamic skipping built in (Assert.Skip, Assert.SkipWhen/SkipUnless).
Device tests — Sentry.Maui.Device.TestApp uses DeviceRunners.XHarness.Xunit (0.1.0-preview.5). DeviceRunners has Xunit3 packages for its visual runner (DeviceRunners.VisualRunners.Xunit3), but there's no XHarness Xunit3 package yet. This probably gates the whole migration, since the Android/iOS CI jobs run through XHarness. Check before starting.
Other extensions — audit anything else built against v2 APIs (custom attributes/discoverers in Sentry.Testing, TestOutputDiagnosticLogger, etc.).
Out of scope
Actually running tests under Native AOT; that stays with #3930. Migrating to v3 is a prerequisite, not the whole job: NSubstitute (Castle proxies) and Verify serialisation (VerifyTests/Verify#1526) remain AOT blockers.
Problem
Our tests use xUnit v2 (
xunit2.9.3). The v2 line is effectively frozen, and the ecosystem around it is moving to v3:Verify.Xunit(v2) in favour ofVerify.XunitV3, so we're stuck onVerify.Xunit31.x. One visible symptom: Verify 31.x has nonet11.0build, so net11 tests load its net10 build and received snapshot files get named*.DotNet11_0.DotNet10_0.received.txt(Namer.cs @ 31.12.5 vs @ 33.0.1, which addsNET11_0). Cosmetic today, but we'll keep missing fixes like this.xunit.v3.aotand source generators (docs). Can we run unit tests in AOT? #3930 assumed xUnit couldn't do AOT and pointed at TUnit; v3 removes the test framework itself as the blocker, though NSubstitute and Verify serialisation still are.Scope
xunit→xunit.v3,Verify.Xunit→Verify.XunitV3,xunit.runner.visualstudioto a v3-compatible version (test/Directory.Build.props).*.Testsprojects.Xunit.Abstractionsis gone —ITestOutputHelpermoves namespace. It's used in about 54 files, including the global<Using Include="Xunit.Abstractions" />.Xunit.SkippableFactdoesn't support v3 — about 36 files use[SkippableFact]/[SkippableTheory]/Skip.If. v3 has dynamic skipping built in (Assert.Skip,Assert.SkipWhen/SkipUnless).Sentry.Maui.Device.TestAppusesDeviceRunners.XHarness.Xunit(0.1.0-preview.5). DeviceRunners has Xunit3 packages for its visual runner (DeviceRunners.VisualRunners.Xunit3), but there's no XHarness Xunit3 package yet. This probably gates the whole migration, since the Android/iOS CI jobs run through XHarness. Check before starting.Sentry.Testing,TestOutputDiagnosticLogger, etc.).Out of scope
Actually running tests under Native AOT; that stays with #3930. Migrating to v3 is a prerequisite, not the whole job: NSubstitute (Castle proxies) and Verify serialisation (VerifyTests/Verify#1526) remain AOT blockers.