![]() |
VOOZH | about |
dotnet add package bunit.web --version 1.40.0
NuGet\Install-Package bunit.web -Version 1.40.0
<PackageReference Include="bunit.web" Version="1.40.0" />
<PackageVersion Include="bunit.web" Version="1.40.0" />Directory.Packages.props
<PackageReference Include="bunit.web" />Project file
paket add bunit.web --version 1.40.0
#r "nuget: bunit.web, 1.40.0"
#:package bunit.web@1.40.0
#addin nuget:?package=bunit.web&version=1.40.0Install as a Cake Addin
#tool nuget:?package=bunit.web&version=1.40.0Install as a Cake Tool
👁 GitHub tag
👁 Nuget
👁 Issues Open
bUnit is a testing library for Blazor Components. Its goal is to make it easy to write comprehensive, stable unit tests. With bUnit, you can:
IJSRuntime, Blazor authentication and authorization, and othersbUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, and MSTest, which run the Blazor component tests in just the same way as any normal unit test. bUnit runs a test in milliseconds, compared to browser-based UI tests which usually take seconds to run.
Go to bUnit.dev to learn more.
bUnit is available on NuGet in various incarnations. Most should just pick the bUnit package:
| Name | Description | NuGet Download Link |
|---|---|---|
| bUnit | Includes the bUnit.core and bUnit.web packages. | 👁 Nuget |
| bUnit.core | Core library that enables rendering a Blazor component in a test context. | 👁 Nuget |
| bUnit.web | Adds support for testing Blazor components for the web. This includes bUnit.core. | 👁 Nuget |
| bUnit.template | Template, which currently creates xUnit-based bUnit test projects only. | 👁 Nuget |
| bUnit.generators | Source code generators to minimize code setup in various situations. | 👁 Nuget |
| bUnit.web.query | bUnit implementation of testing-library.com's query APIs. | 👁 Nuget |
To get started, head to the getting started documentation to learn more.
A huge thank you to the sponsors of bUnit. The higher tier sponsors are:
<table border="0"> <tr> <td align="center" width="120"> <a href="https://www.syncfusion.com/blazor-components?utm_source=bunit&utm_medium=cpc&utm_campaign=bunit_blazor_bancy25"> <img class="avatar" src="https://avatars.githubusercontent.com/u/1699795?s=460" width="72" height="72" alt="@syncfusion" /> <br /> Syncfusion </a> </td> <td align="center" width="120"> <a href="https://github.com/JetBrainsOfficial"> <img class="avatar" src="https://avatars.githubusercontent.com/u/60931315?v=4" width="72" height="72" alt="@JetBrainsOfficial" /> <br /> JetBrains </a> </td> </tr> </table>
Shout outs and a big thank you to all the contributors to the library, including those that raise issues, provide input to issues, and those who send pull requests. Thank you!
These good people have contributed code or documentation to bUnit:
<a href="https://github.com/bUnit-dev/bUnit/graphs/contributors"> <img src="https://contrib.rocks/image?repo=bUnit-dev/bUnit" /> </a>
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
This project is supported by the .NET Foundation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on bunit.web:
| Package | Downloads |
|---|---|
|
bunit.web.testcomponents
bUnit.web.testcomponents enables writing tests using the <Fixture> and <SnapshotTest> components in .razor files. This package only works with xUnit. NOTE: This package represents experimental features of bUnit that has been superseded by better ones. It is provided to avoid breaking existing test suites but is unlikely to see improvements or updates in the future. |
|
|
AntDesign.TestKit
Package Description |
|
|
webenology.blazor.components
Blazor Components used at webenology |
|
|
CDP4.WEB.Common.Test
A Common Library that includes DevExpress Blazor and Tasks test helpers |
|
|
bunit.web.mock
bUnit.web.mock contains an experimental component stubbing mocking library. This library is in preview, and the logic will likely be added back into bUnit when out of preview. |
Showing the top 12 popular GitHub repositories that depend on bunit.web:
| Repository | Stars |
|---|---|
|
ant-design-blazor/ant-design-blazor
🌈A rich set of enterprise-class UI components based on Ant Design and Blazor.
|
|
|
radzenhq/radzen-blazor
Radzen Blazor is the most sophisticated free UI component library for Blazor, featuring 110+ native components including DataGrid, Scheduler, Charts, and advanced theming with full support for Material Design and Fluent UI. If Radzen Blazor is useful to you, a ⭐ on GitHub helps other Blazor developers find it.
|
|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
|
|
Blazored/LocalStorage
A library to provide access to local storage in Blazor applications
|
|
|
Blazored/Modal
A powerful and customizable modal implementation for Blazor applications.
|
|
|
Blazored/Toast
A JavaScript free toast library for Blazor and Razor Component applications
|
|
|
havit/Havit.Blazor
Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
|
|
|
Sidekick-Poe/Sidekick
The main repository for the Sidekick project, a companion trade tool for Path of Exile and Path of Exile 2.
|
|
|
Blazored/SessionStorage
A library to provide access to session storage in Blazor applications
|
|
|
majorimi/blazor-components
Components collection and extensions for Blazor applications.
|
|
|
EdCharbeneau/BlazorSize
Blazor browser size interop for matchMedia and browser window size at runtime.
|
|
|
Aaltuj/VxFormGenerator
The library contains a component, that nests itself into the Blazor EditForm instead of a wrapper around the EditForm. The component is able to generate a form based on a POCO or a ExpandoObject. Because of this architecture the library provides the developer flexibility and direct usage of the EditForm.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.40.0 | 1,575,972 | 6/14/2025 |
| 1.39.5 | 605,138 | 4/4/2025 |
| 1.38.5 | 779,647 | 1/12/2025 |
| 1.37.7 | 179,682 | 12/13/2024 |
| 1.36.0 | 716,108 | 11/12/2024 |
| 1.35.3 | 28,597 | 11/12/2024 |
| 1.34.0 | 242,587 | 11/1/2024 |
| 1.33.3 | 310,152 | 10/11/2024 |
| 1.33.1-preview | 338 | 10/7/2024 |
| 1.32.7 | 123,019 | 10/4/2024 |
| 1.31.3 | 466,926 | 8/16/2024 |
| 1.31.1-preview | 387 | 8/14/2024 |
| 1.30.3 | 185,329 | 7/21/2024 |
| 1.29.5 | 145,396 | 7/5/2024 |
| 1.28.9 | 722,734 | 4/19/2024 |
| 1.28.4-preview | 7,539 | 3/17/2024 |
| 1.28.2-preview | 967 | 3/6/2024 |
| 1.27.17 | 408,721 | 3/2/2024 |
| 1.27.16-preview | 840 | 3/2/2024 |
| 1.27.12-preview | 1,670 | 2/23/2024 |
Changes in bUnit 1.40.0
### Fixed
- Aligned Microsoft packages to their TFM version
See the full changelog at https://github.com/bUnit-dev/bUnit/releases