agentsclimarketplace

Spring boot testing

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/spring-boot-testing

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)From its SKILL.md

Install
npx -y skills add ComeOnOliver/skillshub --skill spring-boot-testing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

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

  1. Red: Write a failing test (e.g., returns 404).
  2. Green: Implement minimal code to pass.
  3. Refactor: Clean up while keeping tests green.
  4. 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 @MockBean for 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.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.