Provides comprehensive testing patterns for Spring Boot applications covering unit, integration, slice, and container-based testing with JUnit 5, Mockito, Testcontainers, and performance optimization.
SkillScore86Maintained
Automatic
◆QA & Test Engineering pack
Last verified 8/21/2026
What it changes
Passed 19 of 22 test cases with the skill, and 17 of 22 without it.
Without skill77%
With skill86%
Checks it passed that the model alone missed
The performance target specified for slice tests is less than 100ms.
The log check searches for the exact text phrase Started Application in.
The service dependency defined in the test class is annotated with @MockBean.
3 fixed16 passed either way2 still failing1 broke
Pass-rate lift
+9 pp
Tokens
+135%
Agent turns
0%
Response time
-7%
Model gemini-3.6-flashMeasured 8/21/2026v119 of 22 cases passed with skill
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
When running Spring Boot integration tests, what phrase should developers look for in the application startup logs to verify that the Spring application context loaded properly?
What was checked, without and with the skill
Checked
Without skill
With skill
The log check searches for the exact text phrase Started Application in.
Missed
Passed
case-17 · gemini-3.6-flash · 8/21/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md273 lines9 files
Spring Boot Testing Patterns
Overview
Comprehensive guidance for writing robust test suites for Spring Boot applications using JUnit 5, Mockito, Testcontainers, and performance-optimized slice testing patterns.
When to Use
Writing unit tests for services or repositories with mocked dependencies
Implementing integration tests with real databases via Testcontainers
Testing REST APIs with @WebMvcTest or MockMvc
Configuring @ServiceConnection for container management in Spring Boot 3.5+
Quick Reference
Test Type
Annotation
Target Time
Use Case
Unit Tests
@ExtendWith(MockitoExtension.class)
< 50ms
Business logic without Spring context
Repository Tests
@DataJpaTest
< 100ms
Database operations with minimal context
Controller Tests
@WebMvcTest / @WebFluxTest
< 100ms
REST API layer testing
Integration Tests
@SpringBootTest
< 500ms
Full application context with containers
Testcontainers
@ServiceConnection / @Testcontainers
Varies
Real database/message broker containers
Core Concepts
Test Architecture Philosophy
Unit Tests — Fast, isolated tests without Spring context (< 50ms)
Slice Tests — Minimal Spring context for specific layers (< 100ms)
Integration Tests — Full Spring context with real dependencies (< 500ms)
Key Annotations
Spring Boot Test:
@SpringBootTest — Full application context (use sparingly)
@DataJpaTest — JPA components only (repositories, entities)
@WebMvcTest — MVC layer only (controllers, @ControllerAdvice)
@WebFluxTest — WebFlux layer only (reactive controllers)