bunit.template 2.0.41-preview

Prefix Reserved
This is a prerelease version of bunit.template.
There is a newer version of this package available.
See the version list below for details.
dotnet new install bunit.template::2.0.41-preview
                    
This package contains a .NET Template Package you can call from the shell/command line.

GitHub tag Nuget Issues Open

bUnit - a testing library for Blazor components

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:

  • Setup and define components under tests using C# or Razor syntax
  • Verify outcomes using semantic HTML comparer
  • Interact with and inspect components as well as trigger event handlers
  • Pass parameters, cascading values and inject services into components under test
  • Mock IJSRuntime, Blazor authentication and authorization, and others

bUnit 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.

NuGet Downloads

bUnit is available on NuGet in various incarnations. Most should just pick the bUnit package:

Name Description NuGet Download Link
bUnit Adds support for testing Blazor components. 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.

Sponsors

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>

Contributors

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>

Code of conduct

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.

.NET Foundation

This project is supported by the .NET Foundation.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.3 1,497 1/8/2026
2.4.2 576 12/21/2025
2.3.4 471 12/18/2025
2.3.3-preview 307 12/16/2025
2.2.2 820 12/8/2025
2.1.1 1,132 11/21/2025
2.0.66 857 11/11/2025
2.0.64-preview 247 10/31/2025
2.0.62-preview 280 10/19/2025
2.0.57-preview 221 10/17/2025
2.0.55-preview 294 10/7/2025
2.0.50-preview 249 9/12/2025
2.0.49-preview 370 8/30/2025
2.0.47-preview 360 8/30/2025
2.0.41-preview 331 6/27/2025
2.0.36-preview 384 2/21/2025
1.34.0 16,443 11/1/2024
1.33.3 1,548 10/11/2024
1.33.1-preview 319 10/7/2024
1.32.7 779 10/4/2024
Loading failed

Changes in bUnit 2.0.41-preview



See the full changelog at https://github.com/bUnit-dev/bUnit/releases