aspire-integration-testing

Automate integration testing for .NET Aspire applications with xUnit fixtures.

1.1k|101|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill aspire-integration-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-integration-testing
Source: https://github.com/Aaronontheweb/dotnet-skills/tree/main/skills/aspire-integration-testing
Command: npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill aspire-integration-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables repeatable, end-to-end testing of .NET Aspire applications by orchestrating real infrastructure and service interactions through xUnit fixtures, endpoint discovery, and health checks.

Core Features & Use Cases

  • Fixture-based testing: Spin up Aspire-hosted apps with IAsyncLifetime fixtures for deterministic test environments.
  • End-to-end validation: Validate service-to-service calls, database readiness, and messaging flows across ASP.NET Core components.
  • Dynamic endpoint discovery: Automatically resolve runtime endpoints instead of hard-coding URLs.
  • Use Case: Write tests that boot your AppHost with real dependencies and assert HTTP responses, database state, and queued messages.

Quick Start

Use the Aspire integration testing fixtures with xUnit to verify a running ASP.NET Core app.

Frequently Asked Questions about aspire-integration-testing

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

FAQPage Schema
How do I run integration tests against ASP.NET Core apps with real infrastructure?

Integration testing with .NET Aspire uses xUnit IAsyncLifetime fixtures to boot your AppHost with real dependencies. This orchestrates actual infrastructure like databases and queues for deterministic end-to-end ASP.NET Core validations.

What is dynamic endpoint discovery in .NET Aspire testing?

Dynamic endpoint discovery in Aspire testing automatically resolves runtime service URLs instead of hard-coding them. This allows xUnit tests to reliably locate and communicate with booted ASP.NET Core components during end-to-end validation.

Can I use xUnit fixtures to validate database readiness and messaging flows in Aspire?

Yes, xUnit IAsyncLifetime fixtures validate database readiness and messaging flows in Aspire. The fixtures orchestrate real infrastructure startup, enabling cross-service validation for databases, queues, and caches within ASP.NET Core workflows.

How do I write end-to-end tests for .NET Aspire service-to-service calls?

To write end-to-end tests for .NET Aspire service-to-service calls, use xUnit fixtures to boot your AppHost and leverage dynamic endpoint discovery. This setup lets you assert HTTP responses and verify cross-service interactions against real infrastructure.

Does .NET Aspire integration testing support health checks for ASP.NET Core components?

Yes, .NET Aspire integration testing supports health checks for ASP.NET Core components. By orchestrating real infrastructure through xUnit fixtures, the workflow ensures services are fully booted and healthy before validating endpoint discovery and cross-service messaging.

What are the limitations of using Aspire fixtures for end-to-end testing?

Using Aspire fixtures for end-to-end testing requires booting real infrastructure like databases and queues, increasing test execution time and complexity. This approach is best suited for validating actual service interactions rather than fast, isolated unit-level logic testing.