Skip to content

Release v4.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 13:11
d7a26cd

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, CratisSpecificationsReadableNames and CratisSpecificationsWarnOnSharedContextMutation MSBuild 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)
  • Given and When as aliases for Establish and Because in every package, with analyzer CRSPEC0009 reporting 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_name is shown as Author › 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 after Destroy. (#69)
  • Assertion behavior is now the same across packages: a null actual value fails with the package's own assertion exception, and ShouldEqualInOrder, ShouldEqualInAnyOrder and ShouldContainSingleMatching are 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-filter selects 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, Dispose and facts fail, every failure is reported instead of only the first. (part of #65)