Table of Contents

Core Framework v2 2.6.2 2023 November 18

Today, we're shipping three new releases:

  • xUnit.net Core Framework v2 2.6.2
  • xUnit.net Analyzers 1.6.0 (release notes)
  • xUnit.net Visual Studio adapter 2.5.4 (release notes)

It's been 2 weeks since the release of 2.6.1.

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 comprehensive list of changes from 2.6.1 to 2.6.2.

Core Framework

  • BUG: We were ignoring stopOnFail when synchronous message reporting was requested. The most common trigger for this situation was disabling test collection parallelization while using xunit.runner.visualstudio. xunit/visualstudio.xunit#392

Assertion Library

  • BUG: We inadvertently broke some usages of Assert.Equal where you were comparing collections of items which had custom comparison logic (i.e., by implementing IEquatable<T>). While this was triggered by some performance optimization that happened in the previous release, it turns out there was a larger issue related to how inner comparers were used during collections & complex object comparisons. The change here was somewhat substantial in that it changes the way default inner comparers are created, and as such may have some unforeseen secondary effects. If you find items that were previous passing suddenly start failing, please open issues so we can evaluate the comparison paths. xunit/xunit#2821

Runner Utility

  • We have updated the "starting" banners slightly when you have diagnostic messages enabled. We are now reporting the status of stopOnFail and have made reporting of maxParallelThreads more consistent with usage: when parallelTestCollections is turned off, maximum parallel threads is ignored and thus now not shown; when it is reported now (because test collection parallelization is on), it is reported as a sub-value of that fact. To illustrate, here are a couple examples of old vs. new:

    Starting: Assembly1 (parallel test collections = on, max threads = 42)
    Starting: Assembly2 (parallel test collections = off, max threads = 42)
    
    Starting: Assembly1 (parallel test collections = on [42 threads], stop on fail = off)
    Starting: Assembly2 (parallel test collections = off, stop on fail = on)
    
  • We have added a new SilentReporter (with -silent switch for the console runner, Reporter="silent" for the MSBuild runner, and RunnerSwitch value of silent for xunit.runner.visualstudio via RunSettings). This reporter is designed to block all messages (other than the copyright banner/logo). While not particularly useful for the console & MSBuild runners, it was requested for xunit.runner.visualstudio because of the habit of dotnet test to output some notices twice (once from our adapter, and once from VSTest). Note that this is not the default, so if you are among the users who are bothered by the double reporting in VSTest, this reporter is for you. xunit/visualstudio.xunit#113