{"enrichment":{"faq":[{"a":"Spring Boot Test Patterns teaches layered testing strategies for Spring Boot applications. It covers unit tests with mocked dependencies, integration tests using Testcontainers for real databases, and focused slice tests via @DataJpaTest and @WebMvcTest. The guide emphasizes test isolation, performance optimization, and REST API testing with MockMvc to help you build comprehensive test suites efficiently.","q":"What are spring boot testing patterns?"},{"a":"Spring Boot Test Patterns shows how to combine JUnit 5 with Mockito for effective testing. Use @Mock for dependencies, @InjectMocks for the class under test, and @ExtendWith(MockitoExtension.class) for annotation support. The guide demonstrates unit test examples, mocking strategies with @MockBean for Spring beans, and integration patterns that layer unit and integration tests for comprehensive coverage.","q":"How do I write spring boot tests with JUnit 5 and Mockito?"},{"a":"Spring Boot Test Patterns covers Testcontainers setup for database testing in Spring Boot 3.5+. Use @ServiceConnection to automatically wire container connections into your application context\u2014no manual URL configuration needed. The guide includes Postgres container examples, shows how @ServiceConnection eliminates boilerplate, and demonstrates integrating Testcontainers with @SpringBootTest for realistic integration tests.","q":"How do I configure Testcontainers and @ServiceConnection?"},{"a":"Spring Boot Test Patterns explains slice testing patterns using @DataJpaTest for repository testing and @WebMvcTest for controller testing. These annotations load only relevant beans, reducing context rebuild overhead and speeding up test execution. The guide shows repository testing examples, MockMvc usage for REST endpoint validation, and how slice tests isolate layers for faster, focused testing.","q":"What is @DataJpaTest and @WebMvcTest for slice testing?"},{"a":"Spring Boot Test Patterns addresses test performance optimization by reducing context rebuild overhead through slice testing (@DataJpaTest, @WebMvcTest), reusing application contexts across tests, and leveraging @ServiceConnection to simplify container setup. The guide covers test isolation strategies, CI/CD pipeline integration for automated test execution, and best practices for maintaining fast feedback loops in your test suite.","q":"How can I optimize spring boot test performance?"},{"a":"Spring Boot Test Patterns demonstrates REST API testing using MockMvc within @WebMvcTest slices. Learn to mock controller dependencies, perform HTTP requests (GET, POST, PUT, DELETE), validate response status and content, and test error scenarios. The guide includes practical examples of controller testing patterns and shows how @WebMvcTest provides a focused testing environment without loading unnecessary beans.","q":"How do I test Spring Boot REST APIs with MockMvc?"}],"shadow_tags":["junit-framework","mock-testing","container-orchestration","test-automation","layer-isolation","performance-benchmarking","ci-cd-integration","database-testing","api-validation","test-architecture"],"summary_rewrite":"Spring Boot Test Patterns guides you through layered testing strategies\u2014from fast unit tests with mocked dependencies to full integration tests with real databases via Testcontainers. Learn focused slice testing with @DataJpaTest and @WebMvcTest, REST API testing with MockMvc, and container setup using @ServiceConnection for Spring Boot 3.5+."},"files":[{"bytes":9352,"path":"plugins/developer-kit-java/skills/spring-boot-test-patterns/SKILL.md","sha256":"fcab76f63cbf35f98fdaf7d1433d55a173af3f010244397ed17e4b5cbb44aa9b","url":"https://skillfed.io/files/giuseppe-trisciuoglio/developer-kit/spring-boot-test-patterns/d78c23ea/SKILL.md"}],"id":"giuseppe-trisciuoglio/developer-kit/spring-boot-test-patterns","links":{"html":"https://skillfed.io/giuseppe-trisciuoglio/developer-kit/spring-boot-test-patterns","md":"https://skillfed.io/giuseppe-trisciuoglio/developer-kit/spring-boot-test-patterns.md","repo":"https://github.com/giuseppe-trisciuoglio/developer-kit"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":37,"language":"Python","last_updated":"2026-06-22","license":"MIT","name":"spring-boot-test-patterns","publisher":"giuseppe-trisciuoglio","stars":311},"relations":{"similar":[{"id":"xu-xiang/everything-claude-code-zh/springboot-tdd"},{"id":"affaan-m/ECC/springboot-tdd"},{"id":"xu-xiang/everything-claude-code-zh/springboot-verification"},{"id":"pluginagentmarketplace/custom-plugin-java/java-testing"},{"id":"affaan-m/ECC/springboot-verification"},{"id":"jabrena/plinth/322-frameworks-spring-boot-testing-integration-tests"},{"id":"bobmatnyc/claude-mpm-skills/spring-boot"},{"id":"jabrena/plinth/323-frameworks-spring-boot-testing-acceptance-tests"},{"id":"marcelorodrigo/agent-skills/spring-boot-testing"},{"id":"softspark/ai-toolkit/java-patterns"}]},"slug":{"owner":"giuseppe-trisciuoglio","repo":"developer-kit","skill":"spring-boot-test-patterns"},"version":"d78c23ea"}
