agentleFS
martincjarvismartincjarvis/development-skills/skills/aspire-integration-testing/SKILL.md

aspire-integration-testing

Skill4 starsChanged 10 months agoMITView on GitHub

Use when repository includes .NET Aspire usage, distributed application setup, or cross-component behavior validation. Produces BDD-style integration tests with health checks and observability verification.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before creating Aspire integration tests, check for existing patterns:

    line 27
  2. Distinctive:

    When existing Aspire tests are detected:

    line 39
  3. Distinctive:

    Existing test project: Add new tests to existing project.

    line 41
  4. Distinctive:

    Existing strategy doc: Update rather than duplicate.

    line 42
  5. Distinctive:

    Partial coverage: Add tests for uncovered components only.

    line 43
  6. Distinctive:

    Only create new test project when detection finds nothing.

    line 45
  7. Very specific:

    Testing Strategy: Update docs/testing-strategy.md with Aspire testing approach

    line 51
  8. Distinctive:

    Test Project README: Document what each test validates

    line 52
  9. Very specific:

    Document: Test strategy in tests/README.md

    line 88
  10. Distinctive:

    Use pre-built templates to accelerate Aspire test setup:

    line 94
  11. Distinctive:

    Add reference to your AppHost project

    line 106
  12. Very specific:

    Run dotnet test to verify setup

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Aspire Integration Testing

Overview

Integration tests for .NET Aspire distributed applications. Validates service startup, health endpoints, cross-component communication, and observability.

REQUIRED: superpowers:test-driven-development, superpowers:verification-before-completion

When to Use

  • Repository includes .NET Aspire AppHost
  • Distributed application with multiple services
  • Cross-component behavior validation needed
  • Opt-out: User explicitly refuses testing

Detection and Deference

Before creating Aspire integration tests, check for existing patterns:

Existing Tests Detection

PatternDetection CommandIf Found
AppHost Testsfind . -name "*.AppHost.Tests.csproj"Enhance existing
Aspire.Hosting.Testinggrep -r "Aspire.Hosting.Testing" *.csprojUse existing project
Test strategy doctest -f docs/testing-strategy.mdReference existing

Deference Rules

When existing Aspire tests are detected:

  1. Existing test project: Add new tests to existing project.
  2. Existing strategy doc: Update rather than duplicate.
  3. Partial coverage: Add tests for uncovered components only.

Only create new test project when detection finds nothing.

Decision Capture

Testing decisions must be captured:

  1. Testing Strategy: Update docs/testing-strategy.md with Aspire testing approach
  2. Test Project README: Document what each test validates
  3. ADR (optional): For complex multi-component testing decisions

Testing Strategy Template

Add to docs/testing-strategy.md:

## Aspire Integration Testing

### Scope

- All AppHost-managed services tested
- Health and alive endpoints validated
- Cross-component flows verified

### Test Categories

1. **Startup Tests:** Application starts, all services healthy
2. **Health Tests:** /health and /alive endpoints
3. **Integration Tests:** Cross-component communication
4. **Observability Tests:** Logging, tracing correlation

Core Workflow

  1. Opt-out check: User refused testing? Document in docs/exclusions.md
  2. Identify components: APIs, workers, databases, queues, caches
  3. Create test project: Reference Aspire.Hosting.Testing
  4. Mandatory tests:
    • Application starts successfully
    • /health endpoint for all services (200 OK)
    • /alive endpoint for all services (200 OK)
    • Resource connectivity (database, queue connections)
  5. Cross-component flows: API → queue → worker, API → database
  6. Observability: Structured logging, correlation IDs
  7. Document: Test strategy in tests/README.md

See Testing Patterns and API Reference.

Reference Templates

Use pre-built templates to accelerate Aspire test setup:

TemplateUse Case
templates/aspire-integration-tests.cs.templateBasic Aspire test class
templates/aspire-test-project.csproj.templateTest project configuration

Using Templates

  1. Copy templates to tests/{Project}.AppHost.Tests/
  2. Replace {NAMESPACE} with your root namespace
  3. Replace {AppHostProject} with your AppHost project name
  4. Add reference to your AppHost project
  5. Run dotnet test to verify setup

Rationalizations Table

ExcuseReality
"Aspire handles health checks"Health checks exist but must be validated. Services can fail silently.
"Too complex to test"Aspire.Hosting.Testing makes it straightforward. 20 min setup.
"Can test in staging"Local testing is 10x faster. Staging debugging wastes hours.
"Demo doesn't need tests"Demos become production. Start right or rewrite.
"Manual verification is enough"Manual tests don't catch regression. Automated tests do.

Red Flags - STOP

  • "Aspire infrastructure just works"
  • "Too complex to test distributed systems"
  • "Can verify in staging/production"
  • "Dashboard shows green"
  • "Will add tests later"

All mean: Apply skill or document explicit opt-out.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.