testcontainers-integration-tests

Run .NET integration tests against Docker-contained databases, caches, and message queues.

98|25|Updated Mar 14, 2020
One-click install
npx skills add https://github.com/baotoq/micro-commerce --skill testcontainers-integration-tests-baotoq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testcontainers-integration-tests
Source: https://github.com/baotoq/micro-commerce/tree/main/.agents/skills/testcontainers-integration-tests
Command: npx skills add https://github.com/baotoq/micro-commerce --skill testcontainers-integration-tests-baotoq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integration testing for distributed systems is hard without real infrastructure. This Skill provides guidance and patterns to run tests against real databases, caches, and message queues inside Docker containers using TestContainers in .NET, ensuring tests exercise actual infrastructure and interactions.

Core Features & Use Cases

  • Real infrastructure testing: run tests against databases (SQL Server, PostgreSQL), caches (Redis), and messaging systems (RabbitMQ) in containers to validate integration points.
  • Multi-container orchestration: design tests that span multiple containers and networks, including shared state, data seeding, and cross-service communication.
  • Patterns & best practices: IAsyncLifetime usage, port binding, wait strategies, container reuse, and data cleanup strategies to keep tests fast and reliable.

Quick Start

Run the integration tests to verify your services against real databases, caches, and message queues in Docker containers.

Frequently Asked Questions about testcontainers-integration-tests

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

FAQPage Schema
How do I run .NET integration tests against real databases and message queues?

Run .NET integration tests against real infrastructure by launching databases, caches, and message queues in Docker containers using TestContainers to validate actual service interactions.

What is the best way to manage container lifecycles for deterministic integration testing in .NET?

Manage deterministic container lifecycles for integration testing by using IAsyncLifetime patterns to handle setup, teardown, port randomization, and wait strategies in .NET.

Can I orchestrate multiple Docker containers like SQL Server and Redis for a single integration test?

Yes, you can orchestrate multi-container scenarios spanning SQL Server, PostgreSQL, Redis, and RabbitMQ to test cross-service communication, shared state, and data seeding.

How do wait strategies work when testing infrastructure in Docker containers?

Wait strategies ensure Docker containers are fully initialized before tests execute, preventing flaky tests by waiting for databases, caches, and message queues to accept connections.

Does TestContainers for .NET support testing RabbitMQ message queues?

Yes, TestContainers for .NET supports RabbitMQ messaging systems, allowing you to validate message queue interactions inside isolated Docker containers during integration tests.

Why are my integration tests flaky when connecting to containerized PostgreSQL databases?

Flaky integration tests against containerized PostgreSQL databases often occur without proper wait strategies or port randomization, which TestContainers solves via deterministic setup and teardown.