Migrate test projects from xUnit v2 to xUnit v3
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
Research direction
Start with test/Directory.Build.props and inventory the roughly 24 *.Tests projects, the 54 ITestOutputHelper usages, and the SkippableFact/SkippableTheory usages. First check whether DeviceRunners has an XHarness xUnit v3 package, then audit Sentry.Testing and TestOutputDiagnosticLogger for v2 APIs. Done means the test projects use the v3 packages and executables, and Android/iOS XHarness CI remains supported.
Written by the indexing model from the issue text.
Description
Problem
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 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. - Native AOT — xUnit v3 supports Native AOT as of 4.0, via
xunit.v3.aotand source generators (docs). #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.visualstudioto a v3-compatible version (test/Directory.Build.props). - Test projects become executables — about 24
*.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).- Device tests —
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. - 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.
- Dominant language
- C#
- Stars
- 775
- Forks
- 262
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 118
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePossibly taken A pull request linked to this issue is open or already merged. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6071 · 1 comment ·
Maintainers usually reply within 1 day
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Possibly taken @pcbeingused33 claimed this today. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6039 · 3 comments ·
Maintainers usually reply within 1 day
-
.NET Platform: Android Task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getsentry/sentry-dotnet#6020 · 3 comments ·
Maintainers usually reply within 1 day
-
Move the Blazor WebAssembly sample off the deprecated DevServerPossibly taken A pull request linked to this issue is open or already merged. Open.NET Framework: Blazor
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
getsentry/sentry-dotnet#5906 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Docs MSBuild Needs Docs Update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-dotnet#5691 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-dotnet
Similar issues
-
In-car displays show 0 km/h and P while the AV drivesPossibly taken @bazilinskyy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bazilinskyy/coupled-sim#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
bug flaky lsp-transport small
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day