umbraco-msw-testing

Mock Umbraco Management API endpoints with Mock Service Worker for testing.

4|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/albanist/umbraco_CLI --skill umbraco-msw-testing-albanist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: umbraco-msw-testing
Source: https://github.com/albanist/umbraco_CLI/tree/main/skills/testing/umbraco-msw-testing
Command: npx skills add https://github.com/albanist/umbraco_CLI --skill umbraco-msw-testing-albanist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill enables reliable testing of Umbraco backoffice extensions by simulating API responses, allowing for thorough testing of various scenarios without a live Umbraco instance.

Core Features & Use Cases

  • API Mocking: Intercept and mock Umbraco Management API calls using Mock Service Worker (MSW).
  • Test Scenario Coverage: Easily test error states, loading states, and edge cases.
  • Use Case: When developing a new Umbraco backoffice component that interacts with the API, use this Skill to mock the API responses during development and testing, ensuring your component behaves correctly under different conditions.

Quick Start

Use the umbraco-msw-testing skill to set up MSW handlers for your Umbraco backoffice extension tests.

Frequently Asked Questions about umbraco-msw-testing

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

FAQPage Schema
How do I mock Umbraco Management API calls for backoffice extension testing?

Mock Umbraco Management API calls by intercepting requests with Mock Service Worker (MSW) to simulate API responses, allowing deterministic testing of backoffice extensions without a live Umbraco instance.

Can I simulate API error states and network delays when testing Umbraco backoffice components?

Yes, you can simulate API error states, loading delays, and edge cases by configuring MSW handlers to return specific error responses for your Umbraco backoffice component tests.

Does MSW work with Web Test Runner for frontend testing?

Yes, MSW integrates with Web Test Runner to intercept and mock Umbraco Management API endpoints, providing a deterministic testing environment for frontend development workflows.

Why should I use MSW to mock APIs instead of testing against a live Umbraco instance?

Using MSW to mock APIs eliminates the need for a live Umbraco instance, ensuring tests are deterministic, fast, and capable of reliably simulating diverse API request/response cycles and error conditions.

What is the best way to set up MSW handlers for Umbraco API endpoints?

The best way to set up MSW handlers for Umbraco API endpoints is to use established patterns that define request interception and simulated responses, ensuring robust testing of backoffice extensions.