Skip to content

Releases: JasperFx/alba

v8.0.0

26 Jul 09:11
31f4dd7
Compare
Choose a tag to compare

Breaking Changes

  • Dropped support for .NET 6/7, .NET 8+ is required.
  • Updated the contract for custom assertions to have better ergonomics:
- public void Assert(Scenario scenario, HttpContext context, ScenarioAssertionException ex)
+ public void Assert(Scenario scenario, AssertionContext context)
    {
-      var body = ex.ReadBody(context);
+      var body = context.ReadBodyAsString();
       if (!body.Contains(Text))
        {
-            ex.Add($"Expected text '{Text}' was not found in the response body");
+            context.AddFailure($"Expected text '{Text}' was not found in the response body");
       }
    }
  • Removed AlbaHost.ForStartup<T>, use AlbaHost.For<T> instead.

New Features

  • Added support for stubbing individual authentication schemes with JwtSecurityStub & AuthenticationStub.
  • Added StatusCodeShouldBeSuccess to built in assertions.

Internal Changes

  • Updated the JWT Token stub to generate tokens using ASP.NET Core 8's JsonWebToken. Make sure your project doesn't reference System.IdentityModel.Tokens.Jwt as it'll cause things to break.
  • Removed a number of long-obsolete types.
  • Sealed a handful of different types.
  • Updated Vitepress to latest (docs)
  • Replaced build infrastructure with Nuke.Build

All Changes

New Contributors

Full Changelog: v7.4.1...v8.0.0

v7.4.1

15 Jun 14:23
5b7edb6
Compare
Choose a tag to compare

Bug fixes

  • Fixed incorrect HttpContextAccessor lifetime in some constructors by @Hawxy in #145

Full Changelog: v7.4.0...v7.4.1

v7.4.0

20 Mar 14:39
bb36f5f
Compare
Choose a tag to compare

New Features

Route Auto-Complete in supported IDEs

Visual Studio & Rider developers will see API routes when typing URL parameters.
image

(@Hawxy in #138)

OpenTelemetry Support

Alba has OpenTelemetry support for Scenario calls and thus can be integrated with OTEL-compatible tooling.

image

(@Hawxy in #137)

Misc

  • Use AspNetCore's internal Mime map instead of shipping our own by @Hawxy in #139

Full Changelog: v7.3.0...v7.4.0

v7.3.0

11 Jan 13:46
cbca408
Compare
Choose a tag to compare

Feature Updates

  • Add ByteArray to the IUrlExpression and Scenario by @dgrozenok in #131
  • Expose ReadBody on ScenarioAssertionException by @Hawxy in #133

New Contributors

Full Changelog: v7.2.1...v7.3.0

v7.2.1

02 Dec 06:54
95e8093
Compare
Choose a tag to compare

Bug fixes

  • Fixed the ShouldHaveValues() header assertion not working when no values are provided. (by @Hawxy in #129)

Full Changelog: v7.2.0...v7.2.1

v7.2.0

30 Nov 03:51
7fa9bb3
Compare
Choose a tag to compare

Feature Updates

  • Remove baseline dependency to improve compatibility with other JasperFx projects. (by @Hawxy in #127)
  • Refactored form data writing to use FormUrlEncodedContent internally. This removes the requirement to manually encode field data.

Full Changelog: v7.1.0...v7.2.0

v7.1.0

29 Nov 01:56
Compare
Choose a tag to compare

Feature Updates

  • Added support for multipart form posts in #126. See the relevant docs. (by @Hawxy)
  • Marked ForStartup<T> extension as obsolete. This will be removed in a future release, please move to a different scaffolding method. (by @jeremydmiller)

Docs

Full Changelog: v7.0.1...v7.1.0

v7.0.0

15 Nov 07:17
Compare
Choose a tag to compare

Breaking changes

Features

  • Add async overloads for IScenarioResult methods (#120). These overloads are preferred over the sync alternatives going forward. (by @Hawxy)
  • Permit the use of ValidAudiences during token creation in JWT extensions. All values on the TokenValidationParameters are now cloned to prevent future problems. (#119) (by @Hawxy)

Bug fixes

  • (v7.0.1) Fix IOptions resolution within Json serialization

Full Changelog: v6.1.0...v7.0.0

v6.1.0

06 Feb 12:03
27fbdc3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v6.0.0...v6.1.0