Use when you need to write or improve integration tests — including Testcontainers with @ServiceConnection, @DataJdbcTest persistence slices, TestRestTemplate or MockMvcTester for HTTP, data isolation, and container lifecycle management for Spring Boot 4.0.x. This should trigger for requests such as Review Java code for Spring Boot integration tests; Apply best practices for Spring Boot integration tests in Java code; Write @SpringBootTest integration tests with Testcontainers; Configure dynamic
NewMaintained
Automatic
◆QA & Test Engineering pack
Last verified 8/20/2026
What it changes
Passed 14 of 18 test cases with the skill, and 14 of 18 without it.
Without skill77%
With skill77%
Checks it passed that the model alone missed
Uses static method annotated with @DynamicPropertySource
Requires running ./mvnw compile or mvn compile prior to applying changes
Uses static @Container field annotations for container lifecycle management
3 fixed14 passed either way2 still failing3 broke
Pass-rate lift
0 pp
Tokens
+21%
Agent turns
0%
Response time
-21%
Model gemini-3.6-flashMeasured 8/20/2026v117 of 22 cases passed with skill · 18 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
Before making any refactoring or code updates to Spring Boot integration test files in an existing project, what build command step must be executed first to ensure safety?
What was checked, without and with the skill
Checked
Without skill
With skill
Requires running ./mvnw compile or mvn compile prior to applying changes
Missed
Passed
case-16 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md59 lines2 files
Spring Boot Integration Testing
Apply Spring Boot integration testing guidelines for Spring Boot 4.0.x.
What is covered in this Skill?
Integration test scope and purpose (verify wiring and contracts, not unit-test duplication)
Testcontainers with @ServiceConnection for zero-config wiring (preferred)
@DynamicPropertySource as fallback for containers without built-in service connection support
Static @Container instances shared across test methods for performance
MockMvcTester for fluent AssertJ-based HTTP assertions (Spring Boot 4.0.x)
Data isolation: each test owns its scenario; no shared mutable state or ordering assumptions
@MockitoBean for mock registration (Spring Boot 4.0.x — @MockBean removed)
Resource lifecycle: Testcontainers JUnit integration for teardown; *IT / integration test separation
Scope: Apply recommendations based on the reference rules and good/bad code examples.
Constraints
Before applying any integration test changes, ensure the project compiles. If compilation fails, stop immediately. After applying improvements, run full verification.
MANDATORY: Run ./mvnw compile or mvn compile before applying any change
SAFETY: If compilation fails, stop immediately
VERIFY: Run ./mvnw clean verify or mvn clean verify after applying improvements
BEFORE APPLYING: Read the reference for detailed rules and good/bad patterns
EDGE CASE: If request scope is ambiguous, stop and ask a clarifying question before applying changes
EDGE CASE: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance
When to use this skill
Review Java code for Spring Boot integration tests
Apply best practices for Spring Boot integration tests in Java code
Write @SpringBootTest integration tests with Testcontainers
Configure dynamic properties for Spring integration tests
Use when building or reviewing core Quarkus applications with CDI beans and scopes, SmallRye Config and profiles, lifecycle, interceptors and events, virtual threads, and test-friendly design. This should trigger for requests such as Review Java code for Quarkus application structure and CDI; Apply best practices for Quarkus configuration and beans; Improve CDI interceptors, events, or programmatic injection in Quarkus; Add virtual-thread configuration or tune CDI lifecycle. ; Review Quarkus CDI