Skip to main content

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, inject services, mock JavaScript interopt, and perform snapshot testing. NOTE: This version includes support for xUnit as the general-purpose test framework. In other words, installing this package is equivalent to installing the packages "bunit.core", "bunit.web", and "bunit.xunit". If you prefer Nunit or MSTest, just install the “bunit.core” and “bunit.web” packages.

Total Downloads
17.9M
17,865,366
Published
Sep 15, 2020
Latest stable version

Install

.NET CLI
dotnet add package bunit --version 1.0.0-beta-10
Package Manager Console
Install-Package bunit -Version 1.0.0-beta-10
PackageReference
<PackageReference Include="bunit" Version="1.0.0-beta-10" />

Frameworks

net5.0 .NETStandard2.1

Dependencies

[1.0.0-beta-10, )
[1.0.0-beta-10, )
[1.0.0-beta-10, )
bunit.core
.NETStandard2.1
[1.0.0-beta-10, )
bunit.web
.NETStandard2.1
[1.0.0-beta-10, )
bunit.xunit
.NETStandard2.1
[1.0.0-beta-10, )

Adoption guide

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.