testing-performance-and-operations

Primary docs: - https://learn.microsoft.com/aspnet/core/test/integration-tests - https://learn.microsoft.com/aspnet/core/host-and-deploy/ - https://learn.microsoft.com/aspnet/core/host-and-deploy/health-checks - https://learn.microsoft.com/

Testing, Performance, And Operations

Primary docs:

Testing Strategy

Use layered testing instead of relying on one style:

Integration Tests

Use Microsoft.AspNetCore.Mvc.Testing and WebApplicationFactory<Program> for integration tests.

Guidance from the official docs:

For SPA or browser-driven scenarios, Microsoft recommends browser automation such as Playwright for .NET.

Performance Defaults

Reach for built-in features before custom optimization layers:

General performance guidance:

Health Checks And Observability

Add health checks for dependencies that matter operationally.

Use separate checks or tags when you need:

Also ensure:

Hosting And Deployment

Typical deployment flow:

  1. dotnet publish
  2. deploy the publish output
  3. run behind a process manager
  4. place a reverse proxy in front when the environment requires it

Know the deployment environment:

Behind proxies or load balancers:

Operational Safeguards