java-testcontainers
Skill by github
Write integration tests in plain Java with Testcontainers 2.x. It covers JUnit Jupiter lifecycle, singleton containers, reuse, wait strategies, networks and Docker Compose for Java developers.
Install java-testcontainers
Built from the published package, never by AI.
git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-copilot/skills/java-testcontainers ~/.claude/skills/java-testcontainersRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/awesome-copilot/skills/java-testcontainers ~/.gemini/antigravity-cli/skills/java-testcontainersAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install java-testcontainers in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill guides an AI assistant through writing and fixing integration tests in plain Java with Testcontainers 2.x. It describes how to detect the existing version and test framework, pick a container that matches production, and choose a lifecycle such as a static per-class container, a per-method container, or a singleton shared across the test run. It also covers the 2.x artifact and package names, a BOM setup for Maven and Gradle, and a checklist for pinned image tags, wait strategies and no fixed host ports.
The skill is framework-neutral and is aimed at Java developers who add or repair Testcontainers tests, or who migrate from 1.x. It points Spring Boot projects to a separate spring-boot-testing skill and Quarkus projects to Dev Services. Reference files cover containers and waiting, lifecycle and reuse, and environment and CI troubleshooting.
Written from the project's SKILL.md and checked against it.
What it can do
- Lifecycle selectionChooses per-class, per-method or singleton container lifecycles for a test suite.
- Version and artifact setupSets up the Testcontainers 2.x BOM and module artifacts for Maven and Gradle.
- 1.x to 2.x migrationMaps renamed artifacts and packages from Testcontainers 1.x to 2.x.
- Wait strategiesExplains configuring waits for module defaults and for generic containers.
- Docker ComposeDescribes using ComposeContainer with Compose v2 for multi-container setups.
- CI and Docker setupCovers Docker and Podman setup, CI runners and failure log capture.
What you need
- Java
- Maven or Gradle
- Docker or Podman
- JUnit Jupiter
Try asking
- Add a Postgres Testcontainers integration test to my Java service
- Migrate my Testcontainers 1.x tests to 2.x packages
- Make my Testcontainers suite share one singleton container
Good to know
- Testcontainers 2.x has no JUnit 4 support.
- No dedicated migration page was found; the release notes are the reference for upgrades.
- Spring Boot and Quarkus projects are pointed to other skills or Dev Services.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/java-testcontainers/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB -
references/containers-and-waiting.md4 KB -
references/environment-ci-troubleshooting.md5 KB -
references/lifecycle-and-reuse.md3 KB
Alternatives to java-testcontainers
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
java-testcontainers: common questions
Does this work with Spring Boot?
The skill is framework-neutral. For Spring Boot it says to use the spring-boot-testing skill if that is installed, for @ServiceConnection and related features.
Which Testcontainers version does it target?
It targets Testcontainers 2.x and shows the testcontainers-bom at version 2.0.5, with a note to verify the current release on Maven Central.
Can it migrate tests from Testcontainers 1.x?
The skill lists renamed artifacts and packages for 2.x and says to read the 2.0.0 release notes and prefer them when they conflict with the skill.
How do I install java-testcontainers?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is java-testcontainers free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is java-testcontainers safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to java-testcontainers?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
