Table of Contents

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.Equal that could cause the output to either be printed incorrectly (or in some cases cause System.ArgumentOutOfRangeException to be thrown). xunit/xunit#3585

  • BUG: We fixed a spurious compiler warning when using assertions with Span<T> or Memory<T> where T is nullable xunit/xunit#3591

Native AOT

  • BUG: We fixed an issue where TestClassGenerator would throw ArgumentException with 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/osPlatform to return the example values from the documentation (e.g., win32, linux, darwin, freebsd and unknown)
    • Added /results/environment/osVersion (with the same value from /results/environment/osRelease)
    • The value in /results/tests/[]/suite was incorrectly formatted as a single string; it is now a string array
    • Added start and stop values to /result/tests/[]
    • Added Not run (due to explicit filtering) to /results/tests/[]/message for tests that were not run
    • Moved /results/tests/[]/extra/output to /results/tests/[]/stdout
    • Moved /results/tests/[]/extra/traits to /results/tests/[]/labels

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 --filter which uses the VSTest filter query syntax. This works with both dotnet test and dotnet 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 return null). xunit/xunit#3594

  • The MTP v2 packages have been updated to Microsoft Testing Platform 2.3.2.

Extensibility

  • We have added CoreTestFrameworkDiscoverer and CoreTestFrameworkExecutor, derived from TestFrameworkDiscoverer and TestFrameworkExecutor respectively. These new layers ensure that the environment variables for assertions and argument formatting will be set correctly.