spring-boot-testing
Skill by github
Spring Boot Testing is a skill that helps an assistant choose and write tests for Spring Boot applications. It covers test slices, Testcontainers, Failsafe integration tests, MockitoBean, JUnit and AssertJ. It is written for Spring Boot 4 developers, with notes for Boot 3.
Install spring-boot-testing
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/spring-boot-testing ~/.claude/skills/spring-boot-testingRun 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/spring-boot-testing ~/.gemini/antigravity-cli/skills/spring-boot-testingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install spring-boot-testing in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through testing Spring Boot applications. It first reads the project's Spring Boot version and test dependencies, and it says not to upgrade them implicitly. It then points to the narrowest suitable test slice, such as @WebMvcTest, @DataJpaTest, @RestClientTest, @JsonTest or @SpringBootTest, and to reference files for each approach.
The skill also covers Testcontainers with @ServiceConnection, Failsafe integration tests, @MockitoBean, AssertJ assertions and test data generation with Instancio. It includes coverage guidance, such as aiming for 80% coverage with Jacoco. It is written for Java developers who use Spring Boot 4, with notes on how Spring Boot 3 differs.
Written from the project's SKILL.md and checked against it.
What it can do
- Test slice selectionChooses the narrowest Spring Boot test slice that fits a controller, repository, REST client, JSON mapping or full application.
- Testcontainers setupShows how to use Testcontainers with @ServiceConnection for databases such as PostgreSQL and MySQL.
- Failsafe integration testsExplains how to bind Failsafe so *IT integration test classes run with ./mvnw verify.
- Mock bean guidanceCovers @MockitoBean and @MockitoSpyBean for mocking and spying dependencies in Spring tests.
- MockMvc and RestTestClientProvides references for AssertJ-style MockMvcTester, classic MockMvc and RestTestClient.
- AssertJ assertionsIncludes reference notes for AssertJ scalars, strings, dates, collections, sets, maps and arrays.
- Test data generationUses Instancio to generate complex test objects with three or more properties.
- Test structure rulesSets an order of main scenario, other paths, then exceptions, and suggests refactoring very complex methods.
What you need
- Spring Boot 3.x or 4.x project
- Maven build with ./mvnw wrapper
- Failsafe plugin declared in build plugins for *IT tests
- Jacoco Maven plugin for coverage reporting
Try asking
- Write a @WebMvcTest for my OrderController using MockMvcTester
- Set up a PostgreSQL Testcontainer with @ServiceConnection for my repository tests
- Help me bind Failsafe so my *IT integration tests run during verify
Good to know
- Examples target Spring Boot 4, and Spring Boot 3 uses different annotations and imports
- Failsafe declared only in pluginManagement means *IT tests never run
- Mock annotations @MockBean and @SpyBean are deprecated and should not be used on Boot 4
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/spring-boot-testing/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/assertj-basics.md4 KB -
references/assertj-collections.md5 KB -
references/context-caching.md2 KB -
references/datajpatest.md5 KB
Show all 16 files
-
references/failsafe-integration-tests.md2 KB -
references/instancio.md5 KB -
references/mockitobean.md5 KB -
references/mockmvc-classic.md6 KB -
references/mockmvc-tester.md8 KB -
references/restclienttest.md5 KB -
references/resttestclient.md5 KB -
references/sb4-migration.md3 KB -
references/test-slices-overview.md6 KB -
references/testcontainers-jdbc.md8 KB -
references/webmvctest.md4 KB
Alternatives to spring-boot-testing
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
spring-boot-testing: common questions
Which Spring Boot versions does this skill support?
It is written for Spring Boot 4 and includes a compatibility section with notes for Spring Boot 3. The skill says to read the project's version before writing tests.
Why are my *IT integration tests not running?
The source says Failsafe declared only in pluginManagement means *IT tests never run. It must be declared in build plugins with the integration-test and verify goals.
Should I use @MockBean or @MockitoBean?
The source says @MockitoBean replaces @MockBean on Spring Boot 4, and the old annotations should not be used. On Boot 3, @MockitoBean is available from version 3.4.
How do I install spring-boot-testing?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is spring-boot-testing free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is spring-boot-testing 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 spring-boot-testing?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
