NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #1913 most downloaded on NuGet
bUnit is a testing library for Blazor components. You can easily define components under test in C# or Razor syntax and verify outcome using semantic HTML diffing/comparison logic. You can interact with and inspect the component under test, trigger event handlers, provide cascading values, and inject services. bUnit also includes a complete fake implementation of Blazor's authentication and authorization logic, navigation manager, and JSInterop.
Last release 1 years ago
14 Jun 2025
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 41 of 42 stable releases
6 versions withdrawn
withdrawn after publishing
127 years old
103 releases · first in 1900
Aligned Microsoft packages to their TFM version
Changes in bUnit 1.40.0
See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Do not set the Uri or BaseUri property on the FakeNavigationManager if navigation is prevented by a handler on net7.0 or greater. Reported and fixed b
Changes in bUnit 1.39.5
Uri or BaseUri property on the FakeNavigationManager if navigation is prevented by a handler on net7.0 or greater. Reported and fixed by @ayyron-dev in #1647FindComponents throws an exception, when a base and derived class was searched for. Reported by @BlueDragon709 in [#1691].See the full changelog at https://github.com/bUnit-dev/bUnit/releases
One column per quarter.
Added support for xunit v3 in the bunit.template. By @linkdotnet.
Changes in bUnit 1.38.5
See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Added support for RendererInfo and AssignedRenderMode (.net9.0).
Changes in bUnit 1.37.7
RendererInfo and AssignedRenderMode (.net9.0).See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Bumped .NET 9 version dependencies to stable packages.
Changes in bUnit 1.36.0
See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Extension packages (bunit.generators and bunit.web.query) are flagged as stable.
Changes in bUnit 1.35.3
bunit.generators and bunit.web.query) are flagged as stable.See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Fixed other packages that have a CVE like Microsoft.Extensions.Caching.Memory. Reported by @polajenko. Fixed by @linkdotnet.
Changes in bUnit 1.34.0
Microsoft.Extensions.Caching.Memory. Reported by @polajenko. Fixed by @linkdotnet.See the full changelog at https://github.com/bUnit-dev/bUnit/releases
bunit.generators respect parameters from the base class.
Changes in bUnit 1.33.3
bunit.generators respect parameters from the base class.net9.0.System.Text.Json due to CVE in 8.0.4.See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Changes in bUnit 1.33.1-preview
Changes in bUnit 1.33.1-preview
See the full changelog at https://github.com/bUnit-dev/bUnit/releases
Ensure that a check in WaitForAssertion and related methods is always performed at once before the wait timer is started. If not, the timeout could oc
Changes in bUnit 1.32.7
WaitForAssertion and related methods is always performed at once before the wait timer is started. If not, the timeout could occure before a wait-for check-condition had been attempted, causing tests to fail without reason. Fixed by @egil.See the full changelog at https://github.com/bUnit-dev/bUnit/releases
UploadFile should only throw an exception when the file size exceeds the maximum allowed size. Reported by @candritzky. Fixed by @linkdotnet.
UploadFile should only throw an exception when the file size exceeds the maximum allowed size. Reported by @candritzky. Fixed by @linkdotnet.Nothing published for this version
UploadFile doesn't throw an exception when the file size exceeds the maximum allowed size. Reported by @MorneZaayman in #1503. Fixed by @linkdotnet.
UploadFile doesn't throw an exception when the file size exceeds the maximum allowed size. Reported by @MorneZaayman in #1503. Fixed by @linkdotnet.CI build changes to force running verification on x64 based AMD CPUs.
ComponentParameterCollectionBuilder.Add that allow passing arguments for asynchronous callback parameters. Reported by springy76. By @Qwertyluk.bUnit's built-in HTML parser did not correctly parse full HTML documents that included a <!DOCTYPE html> as the first element. Fixed by @egil.
@formname directive led to an InvalidOperationException when used on a form element. Reported by @suzu2469 in #1438.
Fixed by @egil/@linkdotnet.NavigationManager is again registered as a singleton instead of scoped.Nothing published for this version
Nothing published for this version
However. Support for net9.0 may move to a future v2 release of bUnit and be deprecated in v1. However, allowing bUnit to build and work with net9.0 pr…
IKeyedServiceProvider in net8.0. Reported by @ViRuSTriNiTy. By @linkdotnet.net9.0. NOTE, there is no commitment as of now to support net9.0 in bUnit v1. However. Support for net9.0 may move to a future v2 release of bUnit and be deprecated in v1. However, allowing bUnit to build and work with net9.0 previews allows our users to keep testing!SupplyFromQueryParameter in net8.0. Reported by @aayjaychan. Fixed by @egil and @linkdotnet.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Upgraded AngleSharp to 1.0.7. Info: The usage of AngleSharpWrappers is not needed anymore. Any usage of Unwrap should not be needed anymore.
AngleSharpWrappers is not needed anymore. Any usage of Unwrap should not be needed anymore.TestContext was disposed, the Blazor Renderer itself didn't dispose components under test. By @linkdotnet.HistoryEntryState on NavigationManager will be populated. By @linkdotnet.IRenderedFragmentBase.InvokeAsync that allow retrieving the work item's return value. By @jcparkyn.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Upgrade all .NET 8 preview dependencies to .NET 8 stable.
Nothing published for this version
Nothing published for this version
Nothing published for this version
When the TestContext was disposed, it disposed of all services via the service provider. However, if there were ongoing renders happening, this could
TestContext was disposed, it disposed of all services via the service provider. However, if there were ongoing renders happening, this could cause inconsistent state in the render tree, since the TestRenderer could try to access the service provider to instantiate components.IAsyncDisposable is now also awaited. Fixed by @egil and @linkdotnet. Reported by @BenSchoen in https://github.com/bUnit-dev/bUnit/issues/1227.Support for custom service provider factories (IServiceProviderFactory<TContainerBuilder>). This enables the use of Autofac and other frameworks for dependency injection like on real-world ASP.NET Core / Blazor projects. By @inf9144.
Ability to raise the oncancel and onclose event, that was introduced with .NET 8.
Nothing published for this version
Nothing published for this version
Nothing published for this version
If the renderer was not idle when calling SetParametersAndRender, the method could return before the parameters were set and the component under test
SetParametersAndRender, the method could return before the parameters were set and the component under test had finished rendering. This was a regression that happened in v1.21.9. Reported by @Skintkingle in https://github.com/bUnit-dev/bUnit/issues/1188. Fixed by @egil.net8.0 supportWaitForAssertion to infinite when a debugger is attached. By @linkdotnet.IRenderedFragment.Find. Reported by a2er. Fixed by @linkdotnet.Nothing published for this version
Nothing published for this version
Nothing published for this version
Update bunit templates to support the target framework version of the project. By @linkdotnet.
Calling MarkupMatches(RenderFragment) from a lambda passed to e.g. WaitForAssertion could lead to a deadlock in certain circumstances. Fixed by @linkdotnet. Reported by @uecasm in https://github.com/bUnit-dev/bUnit/issues/1143.
Rendering complex component hierarchies could result in a stack overflow. Fixed by @egil.. Reported by @groogiam in https://github.com/bUnit-dev/bUnit/issues/1064.
Remove capturing and dispatching markup updates to test frameworks synchronization context again. This could cause deadlocks and does not have any impact on test stability. Fixed by @egil. Reported by @biohazard999 in https://github.com/bUnit-dev/bUnit/issues/1144.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Allow using 3rd party IComponentActivator at the same time as component factories. By @egil. Reported by BenSchoen in .
Allow using 3rd party IComponentActivator at the same time as component factories. By @egil. Reported by BenSchoen in https://github.com/bUnit-dev/bUnit/issues/1129.
Calling IRenderedComponent.Render() or IRenderedComponent.SetParametersAndRender() did not batch up multiple synchronous re-renders after setting parameters. This is now changed such that the method causes the component to re-render with new parameters in the same way as if a parent component had passed new parameters to it. By @egil. Reported by @Jcparkyn in https://github.com/bUnit-dev/bUnit/issues/1119.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added static DefaultWaitTimeout property to TestContext to enable overriding the default timeout of "wait for" methods like WaitForAssertion from 1 se
DefaultWaitTimeout property to TestContext to enable overriding the default timeout of "wait for" methods like WaitForAssertion from 1 second to something else. By @egil.ObjectDisposedException if any methods is accessed after it has been disposed. It will also prevent changes to the internal render tree after it has been disposed. By @egil.Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →