playwright-aspire-restart-harness

Orchestrate .NET Aspire AppHost restarts during Playwright end-to-end tests.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/jonnymuir/Umbraco.Prism --skill playwright-aspire-restart-harness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-aspire-restart-harness
Source: https://github.com/jonnymuir/Umbraco.Prism/tree/main/.claude/skills/playwright-aspire-restart-harness
Command: npx skills add https://github.com/jonnymuir/Umbraco.Prism --skill playwright-aspire-restart-harness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the challenge of testing complex .NET Aspire applications that require full stack restarts mid-test, preventing flaky results and ensuring consistent environment state.

Core Features & Use Cases

  • Lifecycle Management: Provides patterns for the test suite to own the AppHost lifecycle, ensuring clean state between runs.
  • Readiness Probing: Implements robust, multi-gate readiness checks to ensure services like Keycloak and the AppHost are fully initialized before assertions begin.
  • Use Case: Use this when you need to verify that a multi-tenant Umbraco Prism instance correctly persists state and handles authentication after a full service restart.

Quick Start

Configure your Playwright test suite to use the restart harness by implementing the provided AppHost lifecycle helpers in your test support directory.

Frequently Asked Questions about playwright-aspire-restart-harness

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

FAQPage Schema
How do I test .NET Aspire stack restarts using Playwright?

You can test .NET Aspire stack restarts using Playwright by orchestrating the AppHost lifecycle within your test suite, ensuring clean state and deterministic verification across full service restarts.

Why are my Playwright e2e tests flaky when running against Aspire applications?

Playwright e2e tests for Aspire applications are flaky when services are not fully initialized. Implementing multi-layered HTTP and process-level readiness probes prevents flaky results and ensures reliable test execution in ephemeral environments.

What is the best way to manage Aspire AppHost lifecycle during end-to-end testing?

The best way to manage the Aspire AppHost lifecycle during end-to-end testing is having the test suite own the AppHost lifecycle, using multi-gate readiness checks to ensure services like Keycloak are fully initialized before assertions begin.

How do I verify service readiness in ephemeral .NET Aspire testing environments?

You verify service readiness in ephemeral .NET Aspire testing environments by implementing multi-layered HTTP and process-level probes that validate whether the AppHost and services like Keycloak are fully initialized before test execution.

Does this Playwright restart harness support testing complex authentication flows in Aspire?

Yes, the Playwright restart harness supports testing complex authentication flows in Aspire, enabling deterministic verification of system behavior across full service restarts and validating authentication state persistence for multi-tenant instances.

Can I use this harness to test a multi-tenant Umbraco Prism instance with Aspire?

Yes, you can use this harness to test a multi-tenant Umbraco Prism instance with Aspire, verifying that the instance correctly persists state and handles authentication after a full service restart.