frontend-testing

Automate Blazor/MAUI UI validation with bUnit and Playwright tests.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/FoxSilou/ConfigurationClaude --skill frontend-testing-foxsilou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-testing
Source: https://github.com/FoxSilou/ConfigurationClaude/tree/main/frontend/.claude/skills/frontend-testing
Command: npx skills add https://github.com/FoxSilou/ConfigurationClaude --skill frontend-testing-foxsilou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing, reviewing, and discussing frontend tests for Blazor/MAUI can be error-prone and inconsistent across components and UI flows. This guide consolidates methods for validating component behavior (bUnit), UI interactions and workflows (Playwright), and real-stack testing with a shared AppFixture.

Core Features & Use Cases

  • bUnit-based component tests validate Blazor/MAUI components and Presenters without a browser.
  • Playwright-based end-to-end tests cover golden-path user journeys and reproduce UI bugs against a running stack.
  • Consistent testing approach using xUnit + FluentAssertions with stubs instead of mocks, plus data-testid selectors for reliable UI interactions.
  • Realistic test environments with AppFixture to spin up the actual backend and frontend during tests.

Quick Start

Run bUnit tests for components and Playwright tests for golden-path UI against the running app.

Frequently Asked Questions about frontend-testing

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

FAQPage Schema
How do I test Blazor components without launching a browser?

You can test Blazor components without a browser by using bUnit for component-level validation. This approach verifies component behavior and Presenters directly within your .NET testing stack, eliminating the need for a full browser environment during unit tests.

What's the best way to automate end-to-end testing for Blazor and MAUI apps?

The best way to automate end-to-end testing for Blazor and MAUI apps is using Playwright combined with an AppFixture. This setup runs real backend and frontend environments to validate golden-path user journeys and reproduce UI bugs against your actual running stack.

Do I need mocks for frontend testing, or should I use stubs with xUnit?

For frontend testing, you should use stubs instead of mocks. This Skill enforces a consistent testing approach using xUnit and FluentAssertions, relying on stubs to validate UI interactions reliably without the fragility of mock objects.

How do I ensure stable UI selectors during Playwright E2E tests?

To ensure stable UI selectors during Playwright E2E tests, you should enforce data-testid selectors. This practice provides reliable UI interactions by targeting dedicated test attributes rather than fragile CSS classes or dynamic DOM structures.

Does Playwright work with a real backend for MAUI frontend testing?

Yes, Playwright works with a real backend for MAUI frontend testing by using an AppFixture. This fixture spins up the actual backend and frontend environments during your test runs, ensuring realistic integration validation across your stack.

When should I use bUnit versus Playwright for frontend testing?

Use bUnit for unit-level component tests and Presenter validation without a browser, and use Playwright for end-to-end tests covering golden-path user journeys and UI bug reproductions. Both tools integrate within your .NET testing stack using xUnit and FluentAssertions.