Core Framework v3 4.0.0-pre.154 2026 July 17
Today, we're shipping three new prereleases:
- xUnit.net Core Framework v3
4.0.0-pre.154 - xUnit.net Analyzers
2.0.0-pre.60(release notes) - xUnit.net Visual Studio adapter
4.0.0-pre.5(release notes)
This prerelease includes a major new feature: full test parallelization. This supplements the existing parallelization options (disabled parallelization and parallelization by test collection). For more information, see the documentation on parallel modes.
As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
Release Notes
These release notes are a list of changes from 4.0.0-pre.128 to 4.0.0-pre.154.
Core Framework
Added support for full test parallelization. When enabled, this allows all tests to run in parallel against each other, regardless of test collections or shared context. We have added ways to opt out of parallelization at the test collection, test class, test method, theory data source, and theory data row levels; once you have opted out of parallelization at a layer, you cannot opt back in at a lower layer. For more information, see the Parallel Modes section of the Running Tests in Parallel documentation page. xunit/xunit#1986 xunit/xunit#2055
Added support for configuring how long a runner will wait for foreground threads to terminate after the test run is complete (the default remains at 10 seconds). Configuration: xunit.runner.json, testconfig.json xunit/xunit#3587
Assertions
BUG: We fixed an issue while printing results with
Assert.Equalthat could cause the output to either be printed incorrectly (or in some cases causeSystem.ArgumentOutOfRangeExceptionto be thrown). xunit/xunit#3585BUG: We fixed a spurious compiler warning when using assertions with
Span<T>orMemory<T>whereTis nullable xunit/xunit#3591
Native AOT
- BUG: We fixed an issue where
TestClassGeneratorwould throwArgumentExceptionwith cross-file test class inheritance xunit/xunit#3590
Runners
The CTRF result report has been updated to fix several issues and to bring it more closely in alignment with the Microsoft Testing Platform CTRF report:
- Updated
/results/environment/osPlatformto return the example values from the documentation (e.g.,win32,linux,darwin,freebsdandunknown) - Added
/results/environment/osVersion(with the same value from/results/environment/osRelease) - The value in
/results/tests/[]/suitewas incorrectly formatted as a single string; it is now a string array - Added
startandstopvalues to/result/tests/[] - Added
Not run (due to explicit filtering)to/results/tests/[]/messagefor tests that were not run - Moved
/results/tests/[]/extra/outputto/results/tests/[]/stdout - Moved
/results/tests/[]/extra/traitsto/results/tests/[]/labels
- Updated
Console Runner
We've added warning messages for deprecated command line switches. These include:
Deprecated Replacement -ctrf <file>-result-ctrf <file>-html <file>-result-html <file>-json-reporter json-junit <file>-result-junit <file>-noclass <filter>-class- <filter>-nomethod <filter>-method- <filter>-nonamespace <filter>-namespace- <filter>-notrait <filter>-trait- <filter>-nunit <file>-result-nunit <file>-parallel all-parallelizeAssemblies on -parallelMode collections-parallel assemblies-parallelizeAssemblies on -parallelMode off-parallel collections-parallelizeAssemblies off -parallelMode collections-parallel off-parallelizeAssemblies off -parallelMode off-quiet-reporter quiet-silent-reporter silent-teamcity-reporter teamcity-trx <file>-result-trx-verbose-reporter verbose-xml <file>-result-xml <file>-xmlV1 <file>-result-xmlV1 <file>
Microsoft Testing Platform
We have added
--filterwhich uses the VSTest filter query syntax. This works with bothdotnet testanddotnet run(in MTP mode).We have exposed access to the Microsoft Testing Platform Session UID, through
TestContext.Current.MicrosoftTestingPlatformSessionUid(). This API is only available when the test project supports MTP, and will only return a value when the test is running from within MTP (it will otherwise returnnull). xunit/xunit#3594The MTP v2 packages have been updated to Microsoft Testing Platform 2.3.2.
Extensibility
- We have added
CoreTestFrameworkDiscovererandCoreTestFrameworkExecutor, derived fromTestFrameworkDiscovererandTestFrameworkExecutorrespectively. These new layers ensure that the environment variables for assertions and argument formatting will be set correctly.