dotnet-testing-advanced-testcontainers-database

Community

Run real database tests in Docker containers.

Authorkevintsengtw
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill automates integration testing against real databases by provisioning and tearing down containerized SQL Server and PostgreSQL instances for .NET tests.

Core Features & Use Cases

  • Containerized Real Databases: Spawns MSSQL or PostgreSQL containers via Testcontainers to validate database behaviors in a realistic environment.
  • EF Core & Dapper Testing: Enables end-to-end testing of data access layers against actual database features, including transactions and concurrency.
  • Collection Fixture for Performance: Uses shared containers across test classes to significantly reduce startup time and improve test performance.
  • SQL Script Externalization: Supports external SQL scripts to define schemas and seed data for repeatable tests.

Quick Start

  1. Ensure Docker Desktop is running and your environment has Testcontainers for .NET available.
  2. Create a test collection using the SqlServer/PostgreSql container fixture pattern described in this skill, and reference it in your tests.
  3. Run your tests with dotnet test to execute containerized database tests and validate EF Core or Dapper repositories.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dotnet-testing-advanced-testcontainers-database
Download link: https://github.com/kevintsengtw/dotnet-testing-agent-skills/archive/main.zip#dotnet-testing-advanced-testcontainers-database

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.