Spring boot testing
Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/spring-boot-testing
🧠The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill spring-boot-testingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Standards for unit, integration, and slice testing in Spring Boot 3. Use when writing unit tests, integration tests, or slice tests for Spring Boot 3 applications. (triggers: **/*Test.java, webmvctest, datajpatest, testcontainers, assertj)
SKILL.md
1.2 KB, 224 tokens by cl100k_base, as published. Nobody here has run it
Spring Boot Testing Standards
Priority: P0
Implementation Guidelines
TDD Workflow
- Red: Write a failing test (e.g.,
returns 404). - Green: Implement minimal code to pass.
- Refactor: Clean up while keeping tests green.
- Coverage: Verify with JaCoCo.
Best Practices
- Real Infrastructure: Use Testcontainers for DB/Queues. See Integration Template. Avoid H2/Embedded.
- Assertions: Use AssertJ (
assertThat) over JUnit assertions. - Isolation: Use
@MockBeanfor downstream dependencies in Slice Tests.
Anti-Patterns
- No Dirty Contexts: Avoid @MockBean in base classes; it reloads context per test.
- No network I/O in tests: Mock external calls with WireMock.
- No System.out in tests: Use AssertJ assertions instead.
References
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.