Today, we’re shipping one new prerelease:
3.0.0-pre.40
As always, we’d like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
These release notes are a list of changes from 3.0.0-pre.25
to 3.0.0-pre.40
.
We have added a generic version of ClassDataAttribute
so that you can replace [ClassData(typeof(MyData))]
with [ClassData<MyData>]
. Note that this is only supported on .NET, as .NET Framework does not support generic attributes. xunit/xunit#2945
When we try to create custom attributes and it fails, we are now logging these failures via diagnostic messages. Some cases where this is most likely to happen is while registering serializers (with [RegisterXunitSerializer]
), creating test collection factories, creating BeforeAfterTestAttribute
instances, creating test case/collection orderers, collecting traits, among others. These new warning messages come due to a change made to way attributes are constructed in 3.0.0-pre.25
in an attempt to make attribute constructor exceptions be less system-breaking.
We have added two overloads to TestContext.Current.AddAttachment
to allow developers to overwrite an existing attachment. The existing overloads will continue to throw when attempting to add an attachment when one already exists with the given name. xunit/xunit#3340
BUG: We have fixed an issue where the CaptureConsole
and CaptureTrace
attributes were not usable in some circumstances. xunit/xunit#3334
BUG: We have fixed an issue where F# modules with ,
in their name were causing parsing issues during type deserialization, causing them to be non-runnable in Visual Studio. xunit/xunit#3332
BUG: We have fixed an issue where it was possible for us to generate two Microsoft Testing Platform log files with the same filename in some rare conditions. xunit/xunit#3333
BUG: TestContext
was not being properly disposed, which caused a memory leak of disposable objects it contains (in particular, the cancellation token sources). xunit/xunit#3323
Assert.EquivalentWithExclusions
where it would ignore properties too aggressively, leading to potential false positives. xunit/xunit#3338<IsTestProject>true</IsTestProject>
) from the xunit.v3.core
NuGet package, in anticipation of some changes that are being made by the VSTest team. dotnet/sdk#49063