
Testcontainers Integration Tests
This one helps you write integration tests using TestContainers for .NET with xUnit, spinning up real databases, Redis, RabbitMQ, and other infrastructure in Docker containers instead of relying on mocks. It covers SQL Server, PostgreSQL, testing actual database migrations, handling container lifecycle with IAsyncLifetime, and using Respawn to reset data between tests without recreating containers. The core argument is solid: mocking a database doesn't catch SQL syntax errors, constraint violations, or real query behavior. You get actual integration confidence at the cost of slightly slower tests, though the patterns here show you how to reuse containers across test classes to keep things fast. Works in CI/CD environments that support Docker.
- skills.sh installs
- 579
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aaronontheweb/dotnet-skills --skill testcontainers-integration-tests --agent claude-codeInstalls into .claude/skills of the current project.
Files
Integration Testing with TestContainers
When to Use This Skill
Use this skill when:
- Writing integration tests that need real infrastructure (databases, caches, message queues)
- Testing data access layers against actual databases
- Verifying message queue integrations
- Testing Redis caching behavior
- Avoiding mocks for infrastructure components
- Ensuring tests work against production-like environments
- Testing database migrations and schema changes
Reference Files
- database-patterns.md: SQL Server, PostgreSQL, and migration testing examples
- infrastructure-patterns.md: Redis, RabbitMQ, multi-container networks, container reuse, and Respawn
Core Principles
Sponsors
Details
- Repository
- github.com/aaronontheweb/dotnet-skills
- Categories
- Testing & QA, DevOps & CI/CD, Cloud & Infrastructure, .NET & C#
- First seen
- Jun 3, 2026
More from aaronontheweb/dotnet-skills
All 34- Playwright Blazor Testing560
- Dotnet Local Tools550
- Aspire Integration Testing522
- Mjml Email Templates513
- Aspire Service Defaults497
- Aspire Configuration487
- Snapshot Testing484
- Dotnet Devcert Trust457
- Skills Index Snippets456
- Playwright Ci Caching455
- Akka Net Best Practices451
- Mailpit Integration443
- Verify Email Snapshots436
- Akka Hosting Actor Patterns434
- Akka Net Testing Patterns431
- OpenTelemetry NET Instrumentation431
- Akka Net Management430
- Akka Net Aspire Configuration415
- Marketplace Publishing408
- Modern Csharp Coding Standards2.3K
- Csharp Concurrency Patterns1.6K
- Efcore Patterns1.6K
- Dependency Injection Patterns703
- Database Performance700