testcontainers

Orchestrate real databases and message queues in Docker for integration testing.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill testcontainers-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testcontainers
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/testcontainers
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill testcontainers-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies integration testing by allowing you to spin up real, isolated instances of databases, message queues, and other services using Docker containers, eliminating the need for brittle mocks.

Core Features & Use Cases

  • Real Infrastructure: Run tests against actual databases (SQL Server, PostgreSQL, MySQL), message brokers (RabbitMQ, Kafka), and caches (Redis).
  • Test Isolation: Each test gets its own container, ensuring a clean state and preventing interference.
  • CI/CD Friendly: Seamlessly integrates into your CI/CD pipelines for reliable automated testing.
  • Use Case: Write integration tests for your data access layer by spinning up a real PostgreSQL database in a Docker container, running migrations, and then executing your repository methods against it.

Quick Start

Use the testcontainers skill to set up a SQL Server container for integration tests.

Frequently Asked Questions about testcontainers

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

FAQPage Schema
How do I write integration tests for a database without using mocks?

Integration tests can use real databases by orchestrating Docker containers. This Skill spins up isolated database instances, running migrations and repository tests against actual infrastructure to eliminate brittle mocks.

Does testcontainers support message queues like RabbitMQ and Kafka?

Yes, testcontainers supports message queues like RabbitMQ and Kafka. It orchestrates Docker container lifecycle management to verify message queue integrations against authentic infrastructure during testing.

Can I use Docker containers for isolated test environments in CI/CD pipelines?

Docker containers provide isolated test environments for CI/CD pipelines. This Skill manages container lifecycles so each test gets a clean state, ensuring reliable automated testing without interference.

What is the best way to test a data access layer against PostgreSQL?

Testing a data access layer against PostgreSQL is best done by spinning up a real database in a Docker container. This Skill uses testcontainers to manage the container, run migrations, and execute repository methods.

Do I need Docker installed to run integration tests with real dependencies?

Docker is required to run integration tests with real dependencies using testcontainers. The Skill leverages Docker to provide isolated instances of databases, message brokers, and caches for test execution.