Testcontainers for .NET
Pruebas de integración en .NET contra contenedores Docker reales, en las APIs 4.x actuales
Funciona con configuración
Qué hace
Una referencia para escribir pruebas de integración de Testcontainers para .NET: selección de módulos, configuración del constructor, estrategias de espera, redes de contenedores, mapeo de volúmenes y archivos, limpieza a través de Ryuk, y ejemplos funcionales de xUnit, NUnit y MSTest para Postgres, Redis, SQL Server con EF Core, Kafka y pilas multi-contenedor. Se activa cuando necesita una base de datos o cola de mensajes real en una prueba .NET en lugar de un mock, o cuando las pruebas de Testcontainers son inestables en CI.
Informe de la prueba
Nada de esto pudo ser compiled or run: esta machine has no .NET SDK and no Docker or Podman, and Docker es un hard prerequisite for every example in the file, so the output score is left at no-measured-difference rather than guessed at. What I could check, I checked against the library's own source at version 4.13.0: every API the skill uses exists, the Ryuk image tag it names matches the one hardcoded in ResourceReaper.cs, and the constructor pattern it teaches es el one that is still current — el parameterless PostgreSqlBuilder() that most blog posts and a from-memory answer still reach for is marked [Obsolete] "will be removed" in the shipped code. Su own claim of 65+ modules es un shade high, with 64 module projects in the repository, and one Kafka example pins a different image than the library default. Install es clean from a bare HOME and the file es a genuinely well-organised reference, but you need Docker running before any of it does anything.
Probado el: 2026-07-30 · Claude Code 2.x (agent harness)
Instalación
git clone https://github.com/testcontainers/claude-skills.git mkdir -p ~/.claude/skills cd claude-skills && cp -r plugins/testcontainers/skills/testcontainers-dotnet ~/.claude/skills/testcontainers-dotnet
Comandos y prompts de ejemplo
/testcontainers-dotnetPruebas de integración en .NET contra contenedores Docker reales, en las APIs 4.x actuales
Los skills se activan con peticiones en lenguaje natural, sin comandos que memorizar. Tras instalarlo, prompts como estos lo activan (en inglés):
Write an xUnit integration test against a real Postgres container in DockerOur Testcontainers tests are flaky in CI, the container isn't ready in timeHow do I share one SQL Server container across an xUnit test class?