Home

Awesome

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:

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:

NameDescriptionNuGet Download Link
bUnitIncludes the bUnit.core and bUnit.web packages.Nuget
bUnit.coreCore library that enables rendering a Blazor component in a test context.Nuget
bUnit.webAdds support for testing Blazor components for the web. This includes bUnit.core.Nuget
bUnit.templateTemplate, which currently creates xUnit-based bUnit test projects only.Nuget
bUnit.generatorsSource code generators to minimize code setup in various situations.Nuget
bUnit.web.querybUnit 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://github.com/syncfusion"> <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.