spring-boot-testcontainers
Installation
SKILL.md
Testcontainers for Spring Boot Tests
Own the real dependencies a test needs and their lifecycle. A containerized test is an infrastructure test: it is slower, it is order and resource sensitive, and it is the only test that can prove SQL, transactions, and protocol semantics.
When to use
- A test needs a real database, cache, broker, or cloud emulator instead of a double.
- Wiring
@ServiceConnectionor@DynamicPropertySourceinto a Spring test. - Choosing an image tag, a distribution, and a version that matches production, or deciding whether to reuse locally.
- Seeding data, running migrations on container start, isolating parallel classes, or diagnosing a slow or flaky dependency test.
When not to use
- JUnit structure, parameterization, extensions, and tags belong to
spring-boot-junit. - Mock, spy, and fake design belong to
spring-boot-mockito. - Which layer a test belongs to belongs to
spring-boot-integration-testing. - Migration authoring and schema history rules belong to
spring-boot-flyway. - Pipeline runtime, caching, and stage gating belong to
spring-boot-ci-cd.