521-frameworks-micronaut-testing-unit-tests
Installation
SKILL.md
Micronaut Unit Testing
Apply fast testing strategies for Micronaut: Mockito-first, narrow @MicronautTest when HTTP or DI replacement is required.
What is covered in this Skill?
- Pure JUnit 5 + Mockito without container boot
- @MicronautTest with @MockBean factory methods for collaborators
- HttpClient blocking exchanges against the embedded server
- @Property for deterministic configuration in tests
- @ParameterizedTest with @CsvSource / @MethodSource
- Naming: *Test → Surefire; *IT → Failsafe when configured
- When to escalate to
@522
Scope: Apply recommendations based on the reference rules and good/bad code examples.
Constraints
Compile before test refactors; verify the full suite after.
- MANDATORY: Run
./mvnw compileormvn compilebefore applying any change - SAFETY: If compilation fails, stop immediately
- VERIFY: Run
./mvnw clean verifyormvn clean verifyafter applying improvements - BEFORE APPLYING: Read the reference for detailed rules and examples
When to use this skill
- Add or improve unit tests in a Micronaut project
- Reduce unnecessary @MicronautTest usage with Mockito-first tests
Reference
For detailed guidance, examples, and constraints, see references/521-frameworks-micronaut-testing-unit-tests.md.
Weekly Installs
41
Repository
jabrena/cursor-…les-javaGitHub Stars
360
First Seen
1 day ago
Security Audits