testing-testcontainers

Provision TestContainers Docker containers for .NET integration tests with xUnit.

3|Updated Jan 24, 2024
One-click install
npx skills add https://github.com/akoken/dotfiles --skill testing-testcontainers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-testcontainers
Source: https://github.com/akoken/dotfiles/tree/main/config/.copilot/skills/testing-testcontainers
Command: npx skills add https://github.com/akoken/dotfiles --skill testing-testcontainers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables running integration tests against real infrastructure by provisioning Docker containers through TestContainers for .NET, avoiding mocks and enabling realistic validations.

Core Features & Use Cases

  • Real infrastructure tests: databases, queues, caches, and migrations in isolated containers.
  • Multi-container scenarios: verify interactions across services in a single test run.
  • Reuse and cleanup: container lifecycle management to ensure deterministic tests.

Quick Start

Install the TestContainers and xUnit packages, create integration tests in your test project, configure containers as needed, and run your tests with dotnet test.

Frequently Asked Questions about testing-testcontainers

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

FAQPage Schema
How do I run integration tests against real databases in .NET without using mocks?

Provision Docker containers with TestContainers during xUnit test runs to validate databases, message queues, and caches in isolated, production-like environments, avoiding mocks entirely.

Can I test multi-container scenarios with TestContainers in xUnit?

TestContainers supports multi-container networks in xUnit test runs, verifying interactions across databases, queues, and caches within a single isolated test execution.

How do I manage container lifecycle and cleanup for deterministic integration tests?

TestContainers manages container lifecycle provisioning and cleanup during xUnit runs, ensuring deterministic integration tests by isolating infrastructure and supporting container reuse across test executions.

What is the best way to verify database migrations in isolated .NET integration tests?

Provision real databases in Docker containers via TestContainers during xUnit runs to validate migrations against production-like infrastructure, ensuring realistic and isolated migration verification.