playwright-blazor-testing

Test Blazor Server and WebAssembly apps with Playwright for UI and authentication.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/MudraMartin/dotlight-skillset --skill playwright-blazor-testing-mudramartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-blazor-testing
Source: https://github.com/MudraMartin/dotlight-skillset/tree/main/dotnet/playwright-blazor-testing
Command: npx skills add https://github.com/MudraMartin/dotlight-skillset --skill playwright-blazor-testing-mudramartin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.Playwright, Microsoft.Playwright.MSTest, xunit, xunit.runner.visualstudio, and includes scripts (resource) components.

What problem does it solve?

This Skill unit addresses the challenges of testing Blazor applications, providing a comprehensive set of tools and patterns for UI testing, authentication handling, and real-time updates.

Core Features & Use Cases

  • Playwright Integration: Utilizes Playwright to test both Blazor Server and WebAssembly applications.
  • Authentication Handling: Covers methods for interactive login, cookie-based authentication, and OAuth mocking.
  • Real-Time Updates Testing: Includes testing for SignalR-based real-time updates and event handling.
  • Visual Regression Testing: Features for capturing screenshots for visual testing.

Quick Start

Initialize the skill by calling 'playwright-blazor-testing' and follow the setup instructions in the SKILL.md for running your tests.

Frequently Asked Questions about playwright-blazor-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test Blazor applications using Playwright?

Testing Blazor applications with Playwright involves using provided scripts to set up the environment and execute UI tests. This skill supports both Blazor Server and WebAssembly applications for comprehensive test coverage.

How do I handle authentication when testing Blazor apps?

Authentication testing for Blazor apps covers interactive login, cookie-based authentication, and OAuth mocking. These methods ensure secure access flows are validated during UI test execution.

Can I test SignalR real-time updates in Blazor with Playwright?

Yes, testing SignalR real-time updates in Blazor with Playwright is supported. The skill provides patterns for validating real-time event handling and ensuring dynamic UI updates function correctly.

Do I need xUnit or MSTest to run Blazor Playwright tests?

You need Playwright NuGet packages for either MSTest or xUnit to run Blazor tests. The skill integrates with both frameworks using dependencies like xunit.runner.visualstudio and Microsoft.Playwright.MSTest.

What's the best way to capture screenshots for Blazor visual regression testing?

Visual regression testing for Blazor uses Playwright features to capture screenshots during test execution. This allows comparison of UI states to detect unintended visual changes across application updates.

How do I set up the environment to start UI testing Blazor Server and WebAssembly?

Setting up the Blazor UI testing environment requires initializing the skill and following SKILL.md instructions. This process configures Playwright dependencies needed to execute tests for Server and WebAssembly hosts.