testcontainers-integration-tests

Automate .NET integration testing with TestContainers Docker containers.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/MudraMartin/dotlight-skillset --skill testcontainers-integration-tests-mudramartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testcontainers-integration-tests
Source: https://github.com/MudraMartin/dotlight-skillset/tree/main/dotnet/testcontainers
Command: npx skills add https://github.com/MudraMartin/dotlight-skillset --skill testcontainers-integration-tests-mudramartin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Testcontainers, xunit.runner.visualstudio, Microsoft.Data.SqlClient, Npgsql, MySqlConnector, StackExchange.Redis, RabbitMQ.Client, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of writing and debugging container-based integration tests, providing a way to use real databases, queues, and caches in Docker instead of mocks, ensuring a more accurate testing environment.

Core Features & Use Cases

  • Real Infrastructure Testing: Utilizes TestContainers to run real databases, queues, and caches in Docker containers.
  • xUnit Integration: Designed to work seamlessly with xUnit for writing and executing integration tests.
  • Use Case: For instance, when testing a data access layer against a real database or verifying message queue integrations.

Quick Start

Run the testcontainers-integration-tests skill to execute your container-based integration tests.

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 integration tests for .NET using real databases instead of mocks?

Integration tests for .NET use TestContainers to run real databases, queues, and caches in Docker containers instead of mocks. This provides a more accurate testing environment for verifying data access layers and message queue integrations.

What is the best way to test a data access layer against a real database in Docker?

The best way to test a data access layer is using TestContainers to spin up real database instances in Docker. This approach ensures your tests interact with actual database engines rather than simulated mocks, catching integration issues early.

Does TestContainers work with xUnit for .NET integration testing?

TestContainers works seamlessly with xUnit for .NET integration testing. It is designed to integrate with xUnit for writing and executing container-based tests, supporting databases like SQL Server, PostgreSQL, and MySQL.

Can I use TestContainers to test message queues and Redis caches in .NET?

Yes, you can use TestContainers to test message queues and caches in .NET. It supports running RabbitMQ for message queue integrations and Redis for cache testing, alongside relational databases, all within ephemeral Docker containers.

Do I need Docker installed to run TestContainers integration tests?

Yes, Docker is required to run TestContainers integration tests. The Skill automates the creation and teardown of Docker containers for real infrastructure testing, so a functional Docker environment is a necessary prerequisite.