421-frameworks-quarkus-testing-unit-tests — Claude Code skill
Sets up fast unit tests for Quarkus by prioritizing plain Mockito over heavy test containers. It also manages CDI mocking and REST Assured tests.
npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a claude-codeWhat 421-frameworks-quarkus-testing-unit-tests does
This skill shifts Quarkus service tests to plain JUnit 5 with @ExtendWith(MockitoExtension.class). The heavier @QuarkusTest container boots only when CDI injection is strictly necessary. For CDI-managed components, it applies @InjectMock for full replacements or @InjectSpy for partial method overrides. It also structures HTTP checks with REST Assured and collapses duplicate tests via @ParameterizedTest.
A rigid compilation check governs the entire workflow. The project must compile cleanly with ./mvnw compile before any test changes begin. If compilation fails, the agent must halt immediately. Once edits are complete, ./mvnw clean verify validates the whole suite.
Test naming dictates test phases. Suffixes ending in Test run early in Maven Surefire. Suffixes ending in IT are reserved for Failsafe integration runs.
What it helps with
- speed up slow test suites burdened by
@QuarkusTest - write pure unit tests without booting the CDI runtime
- mock CDI dependencies partially using
@InjectSpy - consolidate repetitive test cases with
@ParameterizedTest
Example prompts for the agent
- Refactor order service tests to use pure Mockito without booting Quarkus
- Add partial mocking with
@InjectSpyto this Quarkus test - Convert duplicate test methods to a
@ParameterizedTestwith@CsvSource
How to install 421-frameworks-quarkus-testing-unit-tests
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a claude-code2Manually: put the files in place
~/.claude/skills/421-frameworks-quarkus-testing-unit-tests/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/421-frameworks-quarkus-testing-unit-tests/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a codex2Manually: put the files in place
.agents/skills/421-frameworks-quarkus-testing-unit-tests/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a cursor2Manually: put the files in place
.cursor/skills/421-frameworks-quarkus-testing-unit-tests/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 421-frameworks-quarkus-testing-unit-tests2Manually: put the files in place
.github/skills/421-frameworks-quarkus-testing-unit-tests/SKILL.md1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a gemini-cli2Platform CLI
gemini skills install https://github.com/jabrena/plinth --path skills/421-frameworks-quarkus-testing-unit-testsManually: put the files in place
.devin/skills/421-frameworks-quarkus-testing-unit-tests/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 421-frameworks-quarkus-testing-unit-tests
How to install 421-frameworks-quarkus-testing-unit-tests in Claude Code?
Run npx skills add jabrena/plinth --skill 421-frameworks-quarkus-testing-unit-tests -a claude-code. Alternatively, copy the skill definition to ~/.claude/skills/421-frameworks-quarkus-testing-unit-tests/SKILL.md.
What does 421-frameworks-quarkus-testing-unit-tests do?
It establishes a Mockito-first testing pattern in Quarkus, reserving @QuarkusTest for situations where CDI wiring or REST Assured assertions are explicitly needed.
What is required before applying test refactorings with this skill?
The codebase must build without errors. Running ./mvnw compile or mvn compile is mandatory, and any compilation failure stops the agent before it touches test files.
Source text
SKILL.md · Apache-2.0
--- name: 421-frameworks-quarkus-testing-unit-tests description: Use when you need to write fast unit tests for Quarkus applications — including pure tests with @ExtendWith(MockitoExtension.class), @QuarkusTest with @InjectMock for full CDI mock replacement, @InjectSpy for partial CDI bean mocking, REST Assured for resource-focused tests, @ParameterizedTest with @CsvSource / @MethodSource, QuarkusTestProfile for test-specific configuration overrides, and naming conventions (*Test → Surefire, *IT → Failsafe). For framework-agnostic Java use @131-java-testing-unit-testing. This should trigger for requests such as Add or improve unit tests in a Quarkus project; Reduce slow @QuarkusTest usage with Mockito-first tests; Add @InjectSpy partial mocking or QuarkusTestProfile configuration in Quarkus tests; Convert repeated test methods to @ParameterizedTest with @CsvSource or @MethodSource; Write fast pure unit tests for Quarkus services. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.19.0 --- # Quarkus Unit Testing Apply fast testing strategies for Quarkus: Mockito-first, QuarkusTest when CDI wiring matters. **What is covered in this Skill?** - Pure JUnit 5 + Mockito without container boot (@ExtendWith(MockitoExtension.class)) - @QuarkusTest with @InjectMock for full CDI bean replacement - @InjectSpy for partial mocking — real bean wrapped as spy, specific methods overridden - REST Assured for HTTP-level @QuarkusTest resource tests - @ParameterizedTest with @CsvSource (inline data) and @MethodSource (complex objects) - QuarkusTestProfile and @TestProfile for test-specific configuration overrides - Naming conventions: *Test → Surefire (fast phase), *IT → Failsafe (verify phase) - When to escalate to integration tests (`@422`) **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 compile` or `mvn compile` before applying any change - **PREREQUISITE**: Project must compile before applying test improvements - **SAFETY**: If compilation fails, stop immediately - **BLOCKING CONDITION**: Compilation errors must be resolved by the user before proceeding - **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements - **BEFORE APPLYING**: Read the reference for detailed rules and examples ## When to use this skill - Add or improve unit tests in a Quarkus project - Reduce slow @QuarkusTest usage with Mockito-first tests - Add @InjectSpy partial mocking or QuarkusTestProfile configuration in Quarkus tests - Convert repeated test methods to @ParameterizedTest with @CsvSource or @MethodSource - Write fast pure unit tests for Quarkus services ## Workflow 1. **Read reference and assess project context** Read `references/421-frameworks-quarkus-testing-unit-tests.md` and inspect the current project setup before proposing changes. 2. **Gather scope and decide target improvements** Identify requested outcomes, constraints, and the minimum safe set of changes to apply. 3. **Apply framework-aligned changes** Implement or refactor configuration/code following the reference patterns and project conventions. 4. **Run verification and report results** Execute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions. ## Reference For detailed guidance, examples, and constraints, see [references/421-frameworks-quarkus-testing-unit-tests.md](references/421-frameworks-quarkus-testing-unit-tests.md).
© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth