@xunit@dotnet.social
@xunit@dotnet.social avatar

xunit

@xunit@dotnet.social

xUnit.net is a free, open source, community-focused unit testing tool for .NET. :xunit: :dotnet:

Currently maintained by https://mastodon.social/@bradwilson.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 Core Framework 2.8.0, Analyzers 1.13.0, and Visual Studio adapter 2.8.0. The primary purpose of this release is a new parallelism algorithm that should make test timing more reliable, and make thread deadlocks in your tests less likely.

Read all about the new algorithm here: https://xunit.net/docs/running-tests-in-parallel#algorithms

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.8.0
https://xunit.net/releases/analyzers/1.13.0
https://xunit.net/releases/visualstudio/2.8.0

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 Core Framework 2.7.1, Analyzers 1.12.0, and Visual Studio adapter 2.5.8. This includes a few new assertion overloads, four new analyzers (and two new suppressors), and a handful of bug fixes.

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.7.1
https://xunit.net/releases/analyzers/1.12.0
https://xunit.net/releases/visualstudio/2.5.8

xunit, to dotnet
@xunit@dotnet.social avatar

We are removing support for Visual Studio 2022 17.2 (aka Roslyn 4.2) from the next release of xunit.analyzers, as that version is now out of support. https://learn.microsoft.com/en-us/lifecycle/products/visual-studio-2022

Next up will be Visual Studio 2019 16.11 (aka Roslyn 3.11) on or after April 9th as VS2019 reaches the end of mainstream support. https://learn.microsoft.com/en-us/lifecycle/products/visual-studio-2019

xunit, to dotnet
@xunit@dotnet.social avatar

We have opened up GitHub Sponsors for our project today: https://github.com/sponsors/xunit

We appreciate everybody who uses xUnit.net, and everybody who contributes: discussions, issues, code, and now financially. ❤️

If you would like to discuss contracting us (consultations, presentations, etc.), please reach out to @bradwilson to start that discussion. Thanks!

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 Core Framework 2.6.6 and Analyzers 1.10.0. The core framework update adds assembly-level BeforeAfterTest support, as well as eliminating false security warnings related to old packages from .NET Standard 1.x. We've also added two new analyzers and fixed issues in a few more.

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.6.6
https://xunit.net/releases/analyzers/1.10.0

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 Core Framework 2.6.5 and Analyzers 1.9.0. The core framework updates TheoryData<T> for easier usage, and we've added two new analyzers (in addition to fixing and few bugs).

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.6.5
https://xunit.net/releases/analyzers/1.9.0

xunit, to dotnet
@xunit@dotnet.social avatar

In 2023, we released 9 versions of xunit, 7 versions of xunit.analyzers and 6 versions of xunit.runner.visualstudio.

These:

  • Improved performance and code safety
  • Overhauled the assertion library
  • Added many new assertions
  • Added 20 new analyzers
  • Fixed approximately 100 bugs

A new release of the analyzers is coming soon.

Thank you to everybody who contributed by using us, reporting issues, and submitting PRs.

We're looking forward to 2024!

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 Core Framework 2.6.4, Analyzers 1.8.0, and Visual Studio adapter 2.5.6. This release is primary a bug fix release, but does include reintroduction of support for VS2019 16.11+ for the analyzers project.

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.6.4
https://xunit.net/releases/analyzers/1.8.0
https://xunit.net/releases/visualstudio/2.5.6

xunit, to random
@xunit@dotnet.social avatar

We're in the process of updating the xunit.analyzers package to support VS2019 16.11, as well as adding explicit support for VS2022 17.4, 17.6, and 17.8. This should resolve C# 12-related issues like https://github.com/xunit/xunit/issues/2789

The downside? Running the test suite now takes 5 longer than it used to, since it has to run against Roslyn 3.11, 4.2, 4.4, 4.6, and 4.8. Testing parallelization options to minimize wait times, but it's sloooooow right now. 😭

xunit,
@xunit@dotnet.social avatar

Trying to run all 5 projects in .NET Framework, test machine is 12-core/24-thread CPU (AMD 5900X).

Running assemblies in parallel:

Unlimited threads = 25m 52s
24 threads each = 7m 54s
4 threads each = 5m 43s

Running assemblies sequentially:

Unlimited threads = 7m 21s
24 threads = 3m 51s
4 threads = 3m 24s

Thoughts about this in the next reply...

xunit,
@xunit@dotnet.social avatar

Threading has an overhead. Context switching, in particular, is a big part of that overhead. These tests are CPU-bound, and heavily leverage tasks, which gives them opportunities to pause a test and pick up another one. Tasks here, though, aren't beneficial for parallelism as much as those which may be I/O-bound, since the resource we're competing for here is the CPU. That's why lowering the thread count here helps when we're CPU-bound, because we're reducing the context switching.

xunit,
@xunit@dotnet.social avatar

That said, the reduction in runtime in the sequential 24 vs. 4 probably isn't enough to warrant trying to come up with the "optimal" runtime here, and so leaving with the default, even though it's not optimal, is probably best.

That said, we've added "multiplier syntax" support to the v3 runners which would make such optimization simpler. Let's say you determine that using half the threads is best: you can set maxParallelThreads to 0.5x (for v3 runners only). https://xunit.net/docs/configuration-files#maxParallelThreads

xunit, to random
@xunit@dotnet.social avatar

For everybody contributing to our analyzers project, please note that it's been updated to require a minimum .NET SDK version 8.

The analyzers and fixers are still targeting netstandard2.0, but the unit test projects now target net8.0 instead of net6.0 so that we can test analysis and fixing of code that targets .NET 8.

First update for .NET 8 is xUnit1030 supporting analysis of ConfigureAwait() using ConfigureAwaitOptions: https://github.com/xunit/xunit.analyzers/commit/8aa39e4da213f1350efbf71dc8a565d09f9a1d72

xunit, to dotnet
@xunit@dotnet.social avatar

New documentation page: "Equality with hash sets vs. linear containers"

https://xunit.net/docs/hash-sets-vs-linear-containers

xunit, to dotnet
@xunit@dotnet.social avatar

The next release of xunit.analyzers will move the minimum version of VS 2022 to 17.2. We currently have VS 2022 RTM as the minimum, but Microsoft stopped supporting RTM in July of this year. https://learn.microsoft.com/en-us/visualstudio/productinfo/vs-servicing#long-term-servicing-channel-ltsc-support

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 Core Framework 2.6.2, Analyzers 1.6.0, and Visual Studio adapter 2.5.4. This is primarily a bug fix release.

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.6.2
https://xunit.net/releases/analyzers/1.6.0
https://xunit.net/releases/visualstudio/2.5.4

(Note: we found a bug in the fixer for the new xUnit2023 analyzer, but decided to ship this anyways because the source of the bug wasn't immediately obvious. The analyzer works fine, but the fixer always throws. Sorry about that!)

xunit,
@xunit@dotnet.social avatar

The bug in the fixer for xUnit2023 has been located and worked around, even if the reason it happened isn't particularly well understood by @bradwilson. 😂

It's available as a CI build, version 1.7.0-pre.9. https://xunit.net/docs/using-ci-builds

xunit, to dotnet
@xunit@dotnet.social avatar

We missed an edge case in xUnit1039 regarding type compatibility with generic types (it thinks generic method arguments are never compatible with the provided data). https://github.com/xunit/xunit/issues/2819

We put a simple fix to just ignore generic parameter types and assume the values are compatible (and let the system fall out at runtime if a constraint is violated).

The fix is already available in 1.6.0-pre.2 on feedz.io. https://xunit.net/docs/using-ci-builds

xunit, to dotnet
@xunit@dotnet.social avatar

We just released xunit.analyzers 1.5.0 today. It includes nine new analyzers and two updates to existing analyzers.

Release notes: https://xunit.net/releases/analyzers/1.5.0

xunit,
@xunit@dotnet.social avatar

If you'd like to see how these are surfaced in Visual Studio/VS Code/Rider/etc., you can clone our integration test project and open the solution in the analyzers folder. https://github.com/xunit/xunit.integration

Note that we mark every analyzer as a warning (using .editorconfig) so that they all have the same level of visibility. The integration tests are typically identical (or nearly so) to the examples we put in the documentation.

xunit, to dotnet
@xunit@dotnet.social avatar

We just release v2 Core Framework 2.6.1 today. This is a fix for the compiler ambiguity related to Task vs. ValueTask that was introduced in 2.6.0. To solve this, we have removed all ValueTask overloads.

Release notes: https://xunit.net/releases/v2/2.6.1

xunit, to random
@xunit@dotnet.social avatar

There is some discussion about compiler ambiguities introduced in v2 2.6.0 (specifically with the ValueTask support in Assert.Throws and using lambda functions). Please feel free to add your thoughts here: https://github.com/xunit/xunit/issues/2808

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 2.6.0, with a few new features and several bug fixes.

The most notable new feature is a new net6.0 build of xunit.assert which adds support for Span<>, Memory<>, ValueTask, ValueTask<>, ImmutableHashSet<>, and ImmutableDIctionary<>.

Release notes: https://xunit.net/releases/v2/2.6.0

xunit, to dotnet
@xunit@dotnet.social avatar

We just shipped v2 2.5.3 with a fix for a collection assertion regression.

Release notes: https://xunit.net/releases/v2/2.5.3

Fixed issue: https://github.com/xunit/xunit/issues/2795

xunit, to dotnet
@xunit@dotnet.social avatar

t's release day! 🎉

We just shipped v2 Core Framework 2.5.2, Analyzers 1.4.0, and Visual Studio adapter 2.5.3. The focus of this release was resolving issues related to the new assertion library introduced in 2.5.0, as well as fixing any showstopping bugs.

Enjoy!

Release notes:

https://xunit.net/releases/v2/2.5.2
https://xunit.net/releases/analyzers/1.4.0
https://xunit.net/releases/visualstudio/2.5.3

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • kavyap
  • cisconetworking
  • thenastyranch
  • magazineikmin
  • hgfsjryuu7
  • DreamBathrooms
  • InstantRegret
  • Youngstown
  • slotface
  • PowerRangers
  • Durango
  • everett
  • rosin
  • normalnudes
  • vwfavf
  • modclub
  • ethstaker
  • khanakhh
  • tacticalgear
  • ngwrru68w68
  • osvaldo12
  • mdbf
  • tester
  • cubers
  • Leos
  • GTA5RPClips
  • provamag3
  • All magazines