Testcontainers Integration Tests
Run real dependencies in integration tests with Testcontainers. Generates fixtures for Postgres/Redis/Kafka/Localstack, network setup, reusable containers, and CI tuning for Go, Node, Python, and Java.
This skill covers Testcontainers across languages (Go, Node.js, Python, Java/JVM): spinning up real Postgres, Redis, Kafka, RabbitMQ, MongoDB, Elasticsearch, and Localstack (S3/SQS/DynamoDB) in tests, sharing containers across test suites with reusable mode, creating custom Docker networks for multi-service tests, healthcheck-aware wait strategies, and tuning Testcontainers Cloud or DinD/SIB in CI. Also covers Compose modules and parallelization.
When to use
Use when replacing mocks with real services in tests, writing integration tests against Postgres/Kafka/Localstack, or speeding up CI test suites with reusable containers.
Examples
Postgres + migrations
Real DB tests with versioned schema
Set up Testcontainers with Postgres in my Go test suite — run my Goose migrations against a fresh container per test package, share the same container within a package, and clean up between tests with TRUNCATE
Localstack S3 tests
Test S3 code without AWS
Configure Testcontainers with Localstack for S3 and SQS in my Node integration tests, point the AWS SDK at the container endpoint, and tear down between describe blocks