> 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)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/spring-boot-testing?format=md"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.
Best Practices
- Real Infrastructure: Use Testcontainers for DB/Queues. Avoid H2/Embedded.
- Assertions: Use AssertJ (
assertThat) over JUnit assertions. - Isolation: Use
@MockBeanfor downstream dependencies in Slice Tests.
Anti-Patterns
- Context Reloading:
**No Dirty Contexts**: Avoid @MockBean in base classes. - External Calls:
**No network I/O**: Use WireMock. - System Out:
**No System.out**: Use assertions.
References
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)