Skip to content

spring-boot-testing

Expert Spring Boot testing specialist that selects the best testing techniques for your situation: test slices, Testcontainers with @ServiceConnection,

— (0 ratings) 2.2K downloads github
$ npx skills add https://github.com/github/awesome-copilot --skill spring-boot-testing

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Spring Boot Testing

This skill provides expert guidance for testing Spring Boot applications with modern patterns and best practices. Examples target Spring Boot 4; see the compatibility note below for Boot 3.

Compatibility: detect first

Read the project's Spring Boot version and test dependencies before writing tests, and do not upgrade them implicitly.

Spring Boot 3.x Spring Boot 4.x
JUnit 5 (Jupiter) 6 by default (same org.junit.jupiter.api annotations; JUnit 5 tests keep working)
Mock beans @MockitoBean / @MockitoSpyBean from 3.4 (Spring Framework 6.2); @MockBean / @SpyBean are deprecated @MockitoBean replaces @MockBean (do not use the old ones)
Test starters spring-boot-starter-test covers everything modular: add spring-boot-starter-webmvc-test, spring-boot-starter-data-jpa-test, ...
Slice imports org.springframework.boot.test.autoconfigure... moved, e.g. org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest
Testcontainers 1.x names 2.x names (testcontainers-postgresql)

Details: references/sb4-migration.md, references/mockitobean.md.

Core Principles


Installs: 2.2K | GitHub stars: 41.6K | First seen: Mar 19, 2026

Related skills

New

Testing

grill-me

Relentless interviewing skill that stress-tests plans and designs through systematic questioning.

New • 1.6M
New

Testing

grill-with-docs

Relentless design interrogation that stress-tests plans against your domain model and sharpens terminology inline.

New • 1.4M
New

Coding & dev tools

tdd

Test-driven development with vertical slices, behavior-focused tests, and incremental red-green-refactor cycles.

New • 1.3M