Core Framework v3 4.0.0 2026 August 14
Today, we're shipping three new releases:
- xUnit.net Core Framework v3
4.0.0 - xUnit.net Analyzers
2.0.0(release notes) - xUnit.net Visual Studio adapter
4.0.0(release notes)
Hello, 4.0!
The last major release (3.0.0) was 13 months ago, and the last minor release (3.2.2) was 7 months ago. This release was a major undertaking, adding support for building tests for Native AOT, as well as full test case parallelization. As a result, there are many breaking changes (mostly limited to extensibility APIs), which are documented below.
As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
Note
With 4.0, we are discontinuing official support for Microsoft Testing Platform v1. The default version of Microsoft Testing Platform support now is v2 (currently at version 2.3.3), and we will continue to offer packages to turn off Microsoft Testing Platform support as well (for those who wish to be able to use VSTest on .NET 10+ SDK).
Note
With 4.0, we are discontinuing official support for Mono. While we anticipate that it will usually continue to work, we have noticed occasional Mono-related issues in our own CI process. Given that Mono is now abandoned, we don't anticipate being able to get any support for resolving them. Any requests for xUnit.net support for Mono-related issues will be declined. We may accept bug fixes based on their severity and the impact to the codebase.
Release Notes
These release notes are a comprehensive list of changes from 3.2.2 to 4.0.0.
Core Framework
Version 4.0 introduces support for Native AOT. For more information on how to use Native AOT and the difference between Native AOT and the traditional reflection-based version of xUnit.net, please see Testing with Native AOT.
We have 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
We have introduced test class and test method orderers (in addition to the existing test collection and test case orderers). Ordering is performed as collection => class => method => case. xunit/xunit#3424
We have added
ITestMetadata.TestLabel, makingLabelfrom data attributes available via metadata andTestContext.Current.Test.TestLabel. xunit/xunit#3388We have added the ability to supplement theory method display names with a numeric index to improve lexical sorting of the test names with lots of theory data rows. xunit/xunit#3472
We have added several generic versions of attributes:
AssemblyFixtureAttribute<TFixture>CollectionBehaviorAttribute<TCollectionFactory>TestCaseOrderAttribute<TOrderer>TestClassOrderAttribute<TOrderer>TestCollectionOrderAttribute<TOrderer>TestFrameworkAttribute<TTestFramework>TestMethodOrderAttribute<TOrderer>TestPipelineStartupAttribute<TPipelineStartup>XunitTestCaseDiscovererAttribute<TDiscoverer>
These attribute are alternatives to their non-generic counterparts, and only supported on .NET 8+ (as .NET Framework does not support generic attributes, though the compiler will not complain about them). xunit/xunit#3497
We have added a new test method display option:
RemoveAsyncSuffix. This will remove the wordAsyncfrom the test method name, if present. xunit/xunit#3520We have added support for fixtures to get notified of test execution pipeline events.
Interface Usable by INotifyTestAssemblyLifecycleINotifyTestAssemblyLifecycleAsyncAssembly fixtures INotifyTestCollectionLifecycleINotifyTestCollectionLifecycleAsyncAssembly and collection fixtures INotifyTestClassLifecycleINotifyTestClassLifecycleAsyncAssembly, collection, and class fixtures INotifyTestMethodLifecycleINotifyTestMethodLifecycleAsyncAssembly, collection, and class fixtures INotifyTestCaseLifecycleINotifyTestCaseLifecycleAsyncAssembly, collection, and class fixtures INotifyTestLifecycleINotifyTestLifecycleAsyncAssembly, collection, and class fixtures Any fixture class can implement one or more of these interfaces, and they will be called when the test execution pipeline is underway.
An example of where this might be useful: A fixture would like to create and tear down a database at its normal lifecycle point (for example, a shared database as a collection fixture would create the database when the collection starts, and tear it down when the collection ends). I would also like to reset the data in the database before each test begins. The fixture itself is injectable into the test class via constructor so that the test can be access to the connection information for the test database.
The test-level events are similar in timing today with what's possible via
[BeforeAfterTestAttribute], except that this also supports asynchronous operations (the attribute only supports synchronous). xunit/xunit#3504 xunit/xunit#3528We have extended
ITypeActivatorto be used for fixture creation (in reflection mode). This should extend dependency injection-like capabilities to fixtures (in addition to test classes). xunit/xunit#3567We have added two new MSBuild properties:
NuGet package $(XunitTestProject) $(XunitTestProjectAOT) xunit.v3.core
xunit.v3.core.mtp-v2
xunit.v3.core.mtp-offtrue
true
truexunit.v3.core.aot
xunit.v3.core.aot.mtp-v2
xunit.v3.core.aot.mtp-offtrue
true
truetrue
true
trueThe purpose of these properties is to provide developers with the ability to trigger behavior off knowing whether they're being used in the context of an xUnit.net test project, which can be useful when mixing multiple Microsoft Testing Platform enabled test frameworks.
These MSBuild properties are only set by the above named packages to correlate with test projects (in particular, they are not set when referencing
xunit.v3.extensibility.core, which correlates with extensibility projects). microsoft/testfx#7773BUG:
TestContext.Current.CancellationTokenandTestContext.Current.CancelCurrentTest()were throwing when the test context had been disposed. Now, these operations either return a defaultCancellationTokenor are ignored. xunit/xunit#3554BUG: Debugger detection was moved from discovery time to execution time. This issue manifested as debugger-specific behavior not working when using VSTest inside Visual Studio's Test Explorer (for example, tests with timeouts would still run their timeouts, which is behavior that is normally disabled when running under a debugger). xunit/visualstudio.xunit#450
BUG: We fixed an issue where
SkipUnlessandSkipWhencould not properly resolve if the property were defined on a base class. xunit/xunit#3194BUG: We fixed an issue where the initial thread pool size may be undersized in some situations, causing initial delays during early test execution while the thread pool spun up additional threads dynamically rather than allocating them immediately.
Assertion Library
We have added an overload to
Assert.AllandAssert.AllAsyncwith a booleanstrictparameter. When this isfalse, it behaves like the original version; when it'strue, the assertion will fail if the collection is empty. xunit/xunit#3476We have added the ability to override the way assertion messages are formatted on a per-test basis. This includes:
Assert.OverrideMaxEnumerableLength
Changes the number of items to display in an enumerable/collectionAssert.OverrideMaxObjectDepth
Changes the depth to recurse into complex objects when printing themAssert.OverrideMaxObjectMemberCount
Changes the number of members to show when printing a complex objectAssert.OverrideMaxStringLength
Changes the length of strings to print before truncation
Note
OverrideMaxObjectDepthandOverrideMaxObjectMemberCounthave no effect in Native AOT mode, since the assertion results do not print complex objects in Native AOT (due to reflection limitations).Setting these overrides uses
AsyncLocalfunctionality, so the override only affects the current test in which the override is set. Attempting to override these values outside of a test method is not supported, and may have unanticipated consequences (may affect an unknown set of tests). xunit/xunit#3526BUG: We have fixed an issue with the assert.xunit repository when used as a Git submodule to no longer depend on a source file (
EnvironmentVariables.cs) from the main project. xunit/xunit#3511BUG: We have fixed an issue where
AssertEqualityComparer.GetDefaultComparer()andAssertEqualityComparer.GetDefaultInnerComparer()could throwNullReferenceExceptionon Mono due to improper circular initialization logic. xunit/assert.xunit#73BUG: We fixed an issue with string trimming when trimming in the middle of a surrogate pair, which left an illegal string (rather than escaping the first half of the pair). This could cause issues when generating reports. xunit/xunit#3568
BUG: We fixed an issue where
Assert.Equivalentwas treatingTypeincorrectly, causing comparison failures that should have succeeded and/or generating generally useless error messages. xunit/xunit#3578BUG: 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
Runners
Version 4.0 introduces the xUnit.net native console runner as a .NET Tool. Install this tool with
dotnet tool install -g xunit-console-tooland run it withdotnet xunit-console. It contains thexunit.v3.runner.consolebinary, with builds supporting Linux (32-bit Arm, 64-bit Arm, and 64-bit Intel/AMD), macOS (64-bit Arm and 64-bit Intel/AMD), and Windows (64-bit Arm, 64-bit Intel/AMD, and 32-bit Intel/AMD). Installing this requires you are using .NET 10 SDK or later.We have 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
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
BUG: We fixed an issue where ordering of messages was incorrect during shutdown when a foreground thread was left running. While this was previously fixed the native UX, MTP UX, and
dotnet testin MTP mode in 3.2.2, this update now also fixes the issue our first party runners (likexunit.v3.runner.console) anddotnet testin VSTest mode (with the co-releasedxunit.runner.visualstudio). Note that the issue where test assemblies appear to be pass in this scenario in Test Explorer appears at this point to be unfixable, but at least any command line builds (like CI builds) should fail appropriately. xunit/xunit#3452
Console Runner
We have added
-displayNameand-displayName-as new simple filters. These complement the method name filters, except that they allow filtering based on display name, which allows the user to specify an individual theory data row to run based on its display name.The
-list fulloutput now includes an indication when tests are marked as explicit. xunit/xunit#3502We'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>
Runner Common / Runner Utility
We have added several generic versions of attributes:
RegisterConsoleResultWriterAttribute<TFixture>RegisterMicrosoftTestingPlatformResultWriterAttribute<TCollectionFactory>RegisterResultWriterAttribute<TOrderer>RegisterRunnerReporterAttribute<TOrderer>
These attribute are alternatives to their non-generic counterparts, and only supported on .NET 8+ (as .NET Framework does not support generic attributes, though the compiler will not complain about them). xunit/xunit#3497
We have updated the logic used to sanitize attachment filenames to always exclude all invalid characters from Windows, Linux, and macOS (rather than just the ones from the current OS). This better supports scenarios where attachment files are generated on one OS and then copied to another (e.g., in CI build scenarios). xunit/xunit#3561
We have added a settable
InProcessTestProcessLauncher.LoadContext(of typeAssemblyLoadContext) to be used when the in-process launcher loads the test assembly. This property is only available in .NET 8+ (and not in .NET Framework). xunit/xunit#3559BUG: We have fixed an issue with
AssemblyRunnerwhich was causing it to hang indefinitely due to incorrect cancellation handling. xunit/xunit#3522
Microsoft Testing Platform
We have removed support for Microsoft Testing Platform v1.
The Microsoft Testing Platform v2 packages have been updated to version 2.3.3.
We have updated the default file extensions for three of the reports, so that they are more useful when auto-generating the file name:
- JUnit report, changed from
.junitto.junit.xml - NUnit report, changed from
.nunitto.nunit.xml - xUnit.net v2 report, changed from
.xunitto.xunit.xml
This should make it easier to open and inspect these default report files. xunit/xunit#3498
- JUnit report, changed from
We have added
--filter, which accepts the older VSTest filter syntax. This should assist users who are porting from VSTest to Microsoft Testing Platform. xunit/xunit#3466We have added
--filter-display-nameand--filter-not-display-nameas new simple filters. These complement the method name filters, except that they allow filtering based on display name, which allows the user to specify an individual theory data row to run based on its display name.We have added
--xunit-list, which is similar to the-listoption in the console runner. The implementation has some quirks, so check the issue description for discussion of those. xunit/xunit#3529The output folder for attachments is now the results directory (which can be overridden with
--results-directory). Previously these were being written into the temp folder. xunit/xunit#3562We are setting MSBuild property
<IsTestingPlatformApplication>true</IsTestingPlatformApplication>in anticipation of a potentially breaking change coming in Microsoft Testing Platform v3. microsoft/testfx#7665We have exposed access to the Microsoft Testing Platform Session UID, through
TestContext.Current.MicrosoftTestingPlatformSession(). 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#3594BUG: Exceptions thrown in
ITestPipelineStartup.StopAsyncwere not being caught, causing issues during cleanup. xunit/xunit#3536
Extensibility
We have added
StartTimeandFinishTimeon the major pipeline events viaIStartedMessageandIFinishedMessage. This should mean every starting or finished message now includes the UTC start or finish time associated with the event.The result reports (HTML, XML, etc.) have been converted from XSL-T to custom code, to support Native AOT. Developers can now implement the appropriate interfaces (
IConsoleResultWriterandIMicrosoftTestingPlatformResultWriter) and register them via assembly-level attributes ([RegisterConsoleResultWriter],[RegisterMicrosoftTestingPlatformResultWriter], as well as[RegisterResultWriter]which can be used for a result writer which supports both (all the built-in writers support both, except for xUnit.net v1 XML, which we consider a deprecated holdover and no longer appropriate for MTP).We have added
ISelfExecutingCodeGenTestCaseas a Native AOT equivalent toISelfExecutingXunitTestCase.We have introduced a new Native AOT runner stack (i.e.,
CodeGenTestXyzRunnerclasses) with base classes (i.e.,CodeGenTestXyzRunnerBase) which allow overridable context classes. This matches the model provided in reflection (i.e.,XunitTestXyzRunnerandXunitTestXyzRunnerBaseand the associated context classes). In addition, we have introduced a new layer with shared code between reflection-mode and Native AOT-mode, which are in the classes namedCoreTestXyzRunnerand friends.We have added
CoreTestFrameworkDiscovererandCoreTestFrameworkExecutor, derived fromTestFrameworkDiscovererandTestFrameworkExecutorrespectively. These new layers ensure that the environment variables for assertions and argument formatting will be set correctly in both reflection-mode and Native AOT-mode.
NuGet Packages
- We have created a new source-based NuGet package (
xunit.v3.generatorutility) to help developers extending xUnit.net in Native AOT. You can see more information in Testing with Native AOT including links to extensibility samples that include the required source generators.
Breaking changes
Note
Any breaking change listed here will be removed in the next major version.
In addition to the list of obsoleted APIs below, there are types and APIs which are only supported in reflection-mode. These have been marked as [Obsolete] (and non-functional) in Native AOT, pointing to their AOT counterparts when such things exist. These API differences between reflection-mode and Native AOT-mode will not be removed across major versions, since they are only conditionally obsolete. At this point, we have not done the opposite (importing Native AOT-only APIs into the reflection-mode, marked as [Obsolete]) as we assume that extension developers will typically be adding Native AOT-mode support to existing reflection-mode extensions rather than starting with AOT and then adding reflection later.
We have marked
AssemblyRunnerOptions.ParallelizeTestCollectionsas obsolete in favor ofParallelMode. The existing property will continue to function, with loss of support forParallelMode.All. Developers should useParallelModeto ensure they are reacting to all valid user requests.[assembly: CollectionBehavior]has markedDisableTestParallelization,MaxParallelThreadsandParallelAlgorithmas obsolete and un-callable, as these configuration options are no longer limited to collection-level parallelization. Users should use[assembly: Parallelization]propertiesMode,MaxThreads, andAlgorithmrespectively.We have updated
EqualException.ForMismatchedValuesandEqualException.ForMismatchedValuesWithErrorto include the ability to send in pre-formattedstringvalues. The old signature acceptingobjectvalues is marked obsolete and will format the incoming values appropriately.We have updated
ErrorMessage.FromExceptionto include the assembly unique ID as a parameter. The old signature is marked obsolete and will passnullfor the assembly unique ID.We have marked
ExecutionSinkOptions.AssemblyElementas obsolete, as it is no longer used byExecutionSinksince XSL-T support has been removed from result reports.The following methods have been obsoleted on
ExtensibilityPointFactoryand moved toRegisteredEngineConfig:ExtensibilityPointFactory.GetAssemblyTestCaseOrder
=>RegisterEngineConfig.GetAssemblyTestCaseOrderExtensibilityPointFactory.GetAssemblyTestCollectionOrder
=>RegisterEngineConfig.GetAssemblyTestCollectionOrderExtensibilityPointFactory.GetClassTestCaseOrderer
=>RegisterEngineConfig.GetClassTestCaseOrdererExtensibilityPointFactory.GetCollectionTestCaseOrderer
=>RegisterEngineConfig.GetCollectionTestCaseOrdererExtensibilityPointFactory.GetTestFramework
=>RegisterEngineConfig.GetTestFrameworkExtensibilityPointFactory.GetXunitTestCollectionFactory
=>RegisterEngineConfig.GetTestCollectionFactory
Any argument changes were made to accommodate Native AOT support.
The
FrontControllerRunSettingsconstructor has been obsoleted and is not callable. Static factory functionsWithSerializedTestCases,WithTestCaseIDs, andWithSerializedTestCasesAndTestCaseIDshave been added as replacements.We have marked
ITestFrameworkExecutionOptionsextension methods related to disabling parallelization as obsolete, with the following replacements:options.DisableParallelization()
=>options.ParallelMode()options.DisableParallelizationOrDefault()
=>options.ParallelModeOrDefault()options.GetDisableParallelization()
=>options.GetParallelMode()options.GetDisableParallelizationOrDefault()
=>options.GetParallelModeOrDefault()options.SetDisableParallelization()
=>options.SetParallelMode()
These currently transform values, with loss of support for
ParallelMode.All. Developers should use the parallel mode variants to ensure they are reacting to all valid user requests.We have modified
OutOfProcessTestProcessLauncherBase.StartTestProcessto addshutdownProcessWaitSeconds, to accommodate configurable forced runner shutdown timing. The old signature is marked obsolete and is not called by the platform. Developers should override the new signature.We have modified
ProjectAssemblyRunner.Runto addresultWritersandtestContextInitializedCallback. The old signature is marked obsolete, and calls the new overload with an empty result writers dictionary and anullcallback.We have marked
RegisteredRunnerReporters.Get()as obsolete, in favor ofRegisteredRunnerConfig.GetRunnerReporters().We have marked
TestAssemblyConfigurationpropertiesParallelizeTestCollectionsandParallelizeTestCollectionsOrDefaultas obsolete in favor ofParallelModeandParallelModeOrDefault. The existing property will continue to function, with loss of support forParallelMode.All. Developers should use the parallel mode variants to ensure they are reacting to all valid user requests.We have modified the
TestAssemblyInfoconstructor to requiremaxParallelThreads,parallelAlgorithm, andparallelMode. The old signature is marked as obsolete and is un-callable.We have marked the non-generic version of
TestClassCompareras obsolete in favor ofTestClassComparer<TTestClass>. Using the non-generic version is equivalent toTestClassComparer<ITestClass>.We have updated
TestClassRunner.FailTestMethodto remove theconstructorArgumentsparameter. Developers should override the new overload, as the existing signature will always be called with an empty array.We have marked
TestClassRunner.OrderTestCasesas obsolete and un-callable, due to the addition of extra ordering layers introduced in 4.0. Developers should overrideTestClassRunner.OrderTestMethods(orTestMethodRunner.OrderTestCases) instead.We have updated
TestClassRunner.RunTestMethodto remove theconstructorArgumentsparameter, and is no longer callable. Developers should override the new overload.We have marked the non-generic version of
TestMethodCompareras obsolete in favor ofTestMethodComparer<TTestMethod>. Using the non-generic version is equivalent toTestMethodComparer<ITestMethod>.We have marked
TestRunner.InvokeTestMethodas obsolete and un-callable. The functionality that lived here has been moved toCoreTestRunnerContext.InvokeTest.We have updated the
TestRunnerContextconstructor to remove thetestMethodandtestMethodArgumentsparameters. The old signature is marked obsolete and will call the new overload, ignoring those parameter values.We have updated
TheoryDiscoverer.CreateTestCasesForDataRowto include a index string (an optional zero-padded index to append to the test case display name). Developers should call or override the new signature.We have marked
TransformFactoryas obsolete and un-callable, since XSL-T support has been removed from result reports. Instead, developers should callRegisteredRunnerConfig.GetConsoleResultWriters()orRegisteredRunnerConfig.GetMicrosoftTestingPlatformResultWriters.We have updated
XunitFilters.ToXunit3Argumentsto pass a requiredVersionparameter (which represents the version of xUnit.net v3 that the test assembly is linked against). This helps the filters properly construct command line arguments to invoke v3 test assemblies. The following command line filter arguments are unsupported for xUnit.net v3 less than 4.0.0 (and will thus not be part of the active filter):-displayNameand-displayName-.We have updated
XunitRunnerHelper.RunXunitTestCaseto require parameters for the current parallel mode, scheduler, and method fixture mappings. The obsolete version is no longer callable.We have updated the
XunitTestconstructor to include the test label and a flag to indicate whether the test is allowed to run in parallel. The old signature is marked obsolete and will passnullfor the test label, andfalsefor supporting parallelization.We have updated the
XunitTestAssemblyconstructor to allow the developer to override the assembly display name, assembly path, and target framework. The old signature is marked obsolete and will passnullfor the new values.We have marked
XunitTestAssemblyRunnerBaseContext.DisableParallelizationas obsolete. Developers should callParallelModeinstead.We have updated
XunitTestAssemblyRunnerBaseContext.RunTestCollectionto remove thetestCaseOrdererparameter. The old signature is marked obsolete and will ignore the unused parameter.We have removed
XunitTestAssemblyRunnerBaseContext.SetupParallelismas obsolete and un-callable. Developers should call/overrideCoreTestAssemblyRunnerContext.CreateSchedulerinstead.We have updated the
XunitTestCaseRunnerBaseContext,XunitTestCaseRunnerContext, andXunitTestCaseRunnerconstructors to includeparallelMode,scheduler, andmethodFixtureMappings. The old signatures are marked obsolete and are un-callable.We have marked
XunitTestClassRunnerBaseContext.TestCaseOrdereras obsolete. The replacement is found onTestClass.TestCaseOrderer; however, this value is optional, so the full getter replacement to ensure the correct orderer is to chain call:TestClass.TestCaseOrderer ?? TestClass.TestCollection.TestCaseOrderer ?? TestClass.TestCollection.TestAssembly.TestCaseOrderer ?? DefaultTestCaseOrderer.InstanceThe value is no longer settable.
We have updated the
XunitTestClassRunnerBaseContext,XunitTestClassRunnerContext, andXunitTestClassRunnerconstructors to removetestCaseOrdererand addparallelModeandscheduler. The old signatures are marked obsolete and are un-callable.We have marked
XunitTestCollectionRunnerBaseContext.TestCaseOrdereras obsolete. The replacement is found onTestCollection.TestCaseOrderer; however, this value is optional, so the full getter replacement to ensure the correct orderer is to chain call:TestCollection.TestCaseOrderer ?? TestCollection.TestAssembly.TestCaseOrderer ?? DefaultTestCaseOrderer.InstanceThe value is no longer settable.
We have updated the
XunitTestCollectionRunnerBaseContext,XunitTestCollectionRunnerContext, andXunitTestCollectionRunnerconstructors to removetestCaseOrdererand addparallelModeandscheduler. The old signatures are marked obsolete and are un-callable.We have removed
XunitTestCollectionRunnerBase.GetTestCaseOrderer(). It is no longer called or callable. Providing access to the test case orderer is done via the contextTestCaseOrdererproperty.We have updated the
XunitTestMethodRunnerBaseContext,XunitTestMethodRunnerContext, andXunitTestMethodRunnerconstructors to addparallelModeandscheduler. The old signatures are marked obsolete and are un-callable.We have updated the
XunitTestRunnerBaseContext,XunitTestRunnerContext, andXunitTestRunnerconstructors to addparallelMode,scheduler, andcaseFixtureMappings. The old signatures are marked obsolete and are un-callable.
Obsolete APIs removed
We have removed the following APIs that were marked obsolete during 3.x:
CecilSourceinformationProviderhas been replaced by compiler-provided arguments toFactAttributeExecutionErrorTestCase ctorwithoutsourceFilePathandsourceLineNumberFixtureMappingManager.InitializeAsync()withoutcreateInstancesTestIntrospectionHelper.GetTestCaseDetails()withoutlabelXunit3ArgumentFactory.ForRun()withouttestCaseIDsXunitTestClassRunnerBase.FormatConstructorArgsMissingMessage(no longer called)XunitTestCollectionRunnerBase.GetTestCaseOrderer(newly introduced test class runner takes precedence)XunitTestMethod.GetDisplayName()withoutlabel- The classes in namespace
Xunit.Runnershave been removed (in favor of the classes inXunit.SimpleRunner)