dotnet-structured-testing
Installation
SKILL.md
Structured .NET testing with xUnit and Aspire
This skill builds and extends a test suite with three clearly separated test types on a .NET repository you have never seen:
- Unit tests: one class in isolation, dependencies substituted, no I/O.
- Component tests: one deployable service in-process, against real infrastructure in containers.
- Functional tests: business flows across the whole running system, as a black box.
Principles behind every rule below:
- Real infrastructure, simulated third parties. Databases, brokers and caches run as containers orchestrated by Aspire, with the same engine as production; only third-party HTTP/gRPC APIs are simulated (WireMock). Substitutes such as SQLite or in-memory transports behave differently and hide real bugs.
- Discover, never assume. Engine, configuration keys, schema mechanism, roles, versions and conventions come from
the repository (
references/discovery.md). A wrong assumption produces tests that pass against the wrong thing. - Aspire is only the orchestrator. A test-only AppHost starts the environment; no dashboard, no telemetry.
- Production code is not yours to change — except minimal, declared testability changes (see Boundaries).