Blazor Makes It Easy

  • Test Runner built with Blazor
  • Unit Tests defined with Blazor
  • Asserts Produce Blazor UI
  • <Debug/> and other Components

Modern Testing

  • View Text & File Diffs
  • Screenshots & Pixel Diffs
  • Automate UI Directly or Indirectly
  • One Click UI Test Maintenance

Test Anywhere

  • Interactive E2E testing
  • Server-Side apps
  • Client-Side Web Assembly apps
  • Free & Open Source




Write Tests in Blazor...

@page "/MyTests/TestExample"
@inherits IcuBlazor.IcuTestSuite

@code {
    public void SimpleChecks(Checker check)
    {
        check.True(2 < 3, "a true test");
        check.False(2 == 3, "a false test");
        check.Equal(6*9, 42, "What's the question?");
    }
    async Task Test_async_method(Checker check)
    {
        var t0 = DateTime.Now;
        await Task.Delay(500);
        var dt = (DateTime.Now - t0).TotalMilliseconds;
        check.True(dt<550, $"async test waited {dt} ms");
    }
}

...View Tests in Blazor

Simple blazor unit test view

Get Started

What If Asserts Produced Blazor Components?

What if assertion tests were more than pass/fail operations? What if asserts produced Blazor components? This would allow us to do some powerful things. For example, we could produce visual diffs and enable interactive testing.


visual unit testing in blazor

More on Visual Testing

UI Testing and Automation



IcuBlazor excels in UI testing! You can take a snapshot of a div on your page and compare it pixel-by-pixel with a previous snapshot. And don't worry about the "Too Many Broken Tests" problem. IcuBlazor has a simple solution.

Create End-To-End tests. With the UI Automation API you can create tests that click buttons, enter text, select items, and more. These actions may trigger Javascript code or backend operations. And since this is all C# Blazor code, you can verify your data and UI at any time.

More About UI Testing...

blazor ui testing and automation
An error has occurred. This application may no longer respond until reloaded. Reload 🗙