Repository navigation
Release v4.4.0
Every package now sets up the same way through MSBuild properties, with opt-in readable names, Given/When lifecycle aliases and consistent assertions. xUnit gains shared lifecycle support for fixtures and disposable specifications, and the native runner gains cooperative cancellation and tree filtering. All changes are additive; projects that do not opt in keep their current behavior.
Added
CratisSpecificationsSharedLifecycle,CratisSpecificationsReadableNamesandCratisSpecificationsWarnOnSharedContextMutationMSBuild properties, which set up every package (xUnit v2 and v3, NUnit 4 and 5, TUnit and the native runner) the same way, without handwritten assembly attributes. See Setting up a project. (#70)GivenandWhenas aliases forEstablishandBecausein every package, with analyzerCRSPEC0009reporting a class that declares both forms of the same phase. (#71)- Opt-in readable test names in every package:
for_Author.when_registering.should_keep_the_nameis shown asAuthor › when registering › should keep the name. Test identities, filters and traits are unchanged. (#71) - Shared lifecycle on xUnit v2 and v3 now supports specifications that take class or collection fixtures in their constructor and specifications that implement
IDisposable, disposing them afterDestroy. (#69) - Assertion behavior is now the same across packages: a
nullactual value fails with the package's own assertion exception, andShouldEqualInOrder,ShouldEqualInAnyOrderandShouldContainSingleMatchingare available in every package. The differences that remain until 5.0 are documented in Assertion behavior per package. (#72) - Native runner: Stop and cancellation no longer schedule new classes, wait for running classes to finish and run their cleanup, and expose the token through
SpecificationContext.CancellationToken.--treenode-filterselects classes and facts by namespace, class and method name. (part of #65) - Benchmarks for xUnit v3 on Microsoft.Testing.Platform and for the native runner published with NativeAOT. (#73)
Changed
- Refresh the vendored Cratis AI corpus, adding the .NET performance, diagnostics, MSBuild, Orleans, testing and refactoring skills.
Fixed
- Native runner: when
Destroy,Disposeand facts fail, every failure is reported instead of only the first. (part of #65)