CymruBlazor.Testing 1.13.0

dotnet add package CymruBlazor.Testing --version 1.13.0
                    
NuGet\Install-Package CymruBlazor.Testing -Version 1.13.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CymruBlazor.Testing" Version="1.13.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CymruBlazor.Testing" Version="1.13.0" />
                    
Directory.Packages.props
<PackageReference Include="CymruBlazor.Testing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CymruBlazor.Testing --version 1.13.0
                    
#r "nuget: CymruBlazor.Testing, 1.13.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CymruBlazor.Testing@1.13.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CymruBlazor.Testing&version=1.13.0
                    
Install as a Cake Addin
#tool nuget:?package=CymruBlazor.Testing&version=1.13.0
                    
Install as a Cake Tool

CymruBlazor.Testing

bUnit helpers for testing apps built with CymruBlazor. No browser needed.

using CymruBlazor.Testing;

public sealed class ReferralFormTests : CymruTestContext
{
    [Fact]
    public void The_form_markup_is_well_formed()
    {
        var cut = Render<ReferralForm>();

        cut.ShouldHaveNoMarkupProblems();
    }
}
  • CymruTestContext: a bUnit context with AddCymruBlazor() called, JavaScript interop in loose mode and the library's script modules set up. Derive your test classes from it.
  • CymruMarkupChecks: structural accessibility checks on rendered markup: unique ids, aria-labelledby, aria-describedby and label for targets that exist, an accessible name on every form control and button, and heading levels that do not skip. FindMarkupProblems() returns the messages; ShouldHaveNoMarkupProblems() throws CymruMarkupAssertionException listing them.

These checks complement axe-core, they do not replace it: they cannot see colour, contrast, focus or layout. For a real browser scan, see the companion package CymruBlazor.Testing.Axe and the testing guide.

The package version always matches the CymruBlazor version it was built against.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CymruBlazor.Testing:

Package Downloads
CymruBlazor.Testing.Axe

Browser accessibility tests for apps built with CymruBlazor: renders a component with bUnit, loads it with the library's own CSS into Chromium through Playwright, and scans it with axe-core in the light, dark and high-contrast themes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.13.0 0 10/12/2026