Core Framework v3 1.0.0 2024 December 16
Hello, v3!
Today we're shipping the first release version of xUnit.net v3!
This includes three new releases:
- xUnit.net Core Framework v3
1.0.0 - xUnit.net Analyzers
1.18.0(release notes) - xUnit.net Visual Studio adapter
3.0.0(release notes)
We have shipped several prerelease versions over the last 6 months, and accumulated a good amount of documentation for both users who are migrating from Core Framework v2 as well as users who are new to xUnit.net starting with Core Framework v3. This includes:
- Getting started with the .NET SDK command line
Includes running tests from the command line, Visual Studio, Visual Studio Code, and JetBrains Rider - Migrating from xUnit.net v2
- What's new in xUnit.net v3
- Microsoft Testing Platform support in v3
- Query Filter Language
- Serialization with
IXunitSerializerandIXunitSerializable - Writing a custom Runner Reporter for xUnit.net v3
For existing v2 users, the migration guide will help you understand what changes are necessary to get your v2 test project ready to upgrade to v3, and it includes a fairly comprehensive list of the changes (and hopefully relatively small bumps in the road) that you can expect. This latter part is provided primarily in resource form, so rather than reading the giant boring lists, you can do a search on the page when you encounter issues with specific types. Once you've got your project ported over to v3, the what's new guide will be useful to understand what new features are available to you with v3.
Please note that you will need to use a version 3.x.y release of the Visual Studio adapter to run v3 tests, as the 2.x.y releases are only capable of running v1 and v2 tests. These 3.x.y builds are capable of running v1, v2, and v3 tests, so that should be your first upgrade, even before you start migrating any tests to Core Framework v3.
As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
Last Minute Issue Discovered
While verifying the final packages, we discovered a problem with the xunit3-extension template, in that it hadn't been updated for the recent change to BeforeAfterTestAttribute where we reverted from returning ValueTask to void. This will be fixed in a future release, but it wasn't deemed important enough to re-cut a new build for. If you are using that extension and want to test it with the SupportedOSAttribute sample that's in the project, you will need to make the update to fix the signature yourself.
Runner support for Core Framework v3
Supported by the xUnit.net team
Functional:
In-box Console and MSBuild runners
Command line (dotnet testanddotnet vstest) [tested with17.11.9.46202]
Visual Studio 2022 (Test Explorer) [tested with17.12.3]
Visual Studio Code [tested with1.95.3and C# Dev Kit1.14.14]
Support for VSTest requires a 3.x.y build of xunit.runner.visualstudio.
Support for Microsoft Testing Platform does not require an adapter.
Supported by third parties
Functional:
NCrunch [requires
5.11or later]
Resharper/Rider [requires2024.2or later]
Status unknown:
CodeRush