{"id":"af11764a-495a-4030-a52b-36c39436bb4d","shortId":"Lr8kfg","kind":"skill","title":"421-frameworks-quarkus-testing-unit-tests","tagline":"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, @Par","description":"# Quarkus Unit Testing\n\nApply fast testing strategies for Quarkus: Mockito-first, QuarkusTest when CDI wiring matters.\n\n**What is covered in this Skill?**\n\n- Pure JUnit 5 + Mockito without container boot (@ExtendWith(MockitoExtension.class))\n- @QuarkusTest with @InjectMock for full CDI bean replacement\n- @InjectSpy for partial mocking — real bean wrapped as spy, specific methods overridden\n- REST Assured for HTTP-level @QuarkusTest resource tests\n- @ParameterizedTest with @CsvSource (inline data) and @MethodSource (complex objects)\n- QuarkusTestProfile and @TestProfile for test-specific configuration overrides\n- Naming conventions: *Test → Surefire (fast phase), *IT → Failsafe (verify phase)\n- When to escalate to integration tests (`@422`)\n\n**Scope:** Apply recommendations based on the reference rules and good/bad code examples.\n\n## Constraints\n\nCompile before test refactors; verify the full suite after.\n\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **PREREQUISITE**: Project must compile before applying test improvements\n- **SAFETY**: If compilation fails, stop immediately\n- **BLOCKING CONDITION**: Compilation errors must be resolved by the user before proceeding\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed rules and examples\n\n## When to use this skill\n\n- Add or improve unit tests in a Quarkus project\n- Reduce slow @QuarkusTest usage with Mockito-first tests\n- Add @InjectSpy partial mocking or QuarkusTestProfile configuration in Quarkus tests\n- Convert repeated test methods to @ParameterizedTest with @CsvSource or @MethodSource\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/421-frameworks-quarkus-testing-unit-tests.md` and inspect the current project setup before proposing changes.\n\n2. **Gather scope and decide target improvements**\n\nIdentify requested outcomes, constraints, and the minimum safe set of changes to apply.\n\n3. **Apply framework-aligned changes**\n\nImplement or refactor configuration/code following the reference patterns and project conventions.\n\n4. **Run verification and report results**\n\nExecute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/421-frameworks-quarkus-testing-unit-tests.md](references/421-frameworks-quarkus-testing-unit-tests.md).","tags":["421","frameworks","quarkus","testing","unit","tests","cursor","rules","java","jabrena","agent-skills","ai-skills"],"capabilities":["skill","source-jabrena","skill-421-frameworks-quarkus-testing-unit-tests","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/421-frameworks-quarkus-testing-unit-tests","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,500 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:38.335Z","embedding":null,"createdAt":"2026-04-18T22:02:21.753Z","updatedAt":"2026-04-26T12:53:38.335Z","lastSeenAt":"2026-04-26T12:53:38.335Z","tsv":"'/mvnw':168,205 '1':269 '2':287 '3':307 '4':324 '421':1 '422':143 '5':73 'action':345 'add':230,248 'align':311 'appli':51,145,174,182,213,216,306,308 'applic':19 'appropri':331 'assess':273 'assur':41,101 'base':147 'bean':38,86,93 'block':191 'boot':77 'build/tests':332 'cdi':31,37,62,85 'chang':176,286,304,312,336 'clean':206,210 'code':154 'compil':157,169,172,180,187,193 'complex':116 'condit':192 'configur':125,254 'configuration/code':316 'constraint':156,297,352 'contain':76 'context':275 'convent':128,323 'convert':258 'cover':67 'csvsourc':111,265 'current':281 'data':113 'decid':291 'detail':221,348 'error':194 'escal':139 'exampl':155,224,350 'execut':330 'extendwith':24,78 'fail':188 'failsaf':134 'fast':14,52,131 'first':59,246 'focus':45 'follow':317,343 'follow-up':342 'framework':3,310 'framework-align':309 'frameworks-quarkus-testing-unit-test':2 'full':30,84,163 'gather':288 'good/bad':153 'guidanc':349 'http':104 'http-level':103 'identifi':294 'immedi':190 'implement':313 'improv':184,214,232,293 'includ':20 'injectmock':28,82 'injectspi':34,88,249 'inlin':112 'inspect':279 'integr':141 'junit':72 'level':105 'mandatori':166 'matter':64 'method':98,261 'methodsourc':115,267 'minimum':300 'mock':32,39,91,251 'mockito':58,74,245 'mockito-first':57,244 'mockitoextension.class':25,79 'must':179,195 'mvn':171,209 'name':127 'need':11 'object':117 'outcom':296 'overrid':126 'overridden':99 'par':47 'parameterizedtest':109,263 'partial':36,90,250 'pattern':320 'phase':132,136 'prerequisit':177 'proceed':202 'project':178,238,274,282,322 'propos':285 'pure':21,71 'quarkus':4,18,48,56,237,256 'quarkustest':26,60,80,106,241 'quarkustestprofil':118,253 'read':217,270,276 'real':92 'recommend':146 'reduc':239 'refactor':160,315 'refer':150,219,271,319,346 'references/421-frameworks-quarkus-testing-unit-tests.md':277,354,355 'repeat':259 'replac':33,87 'report':328 'request':295 'resolv':197 'resourc':44,107 'resource-focus':43 'rest':40,100 'result':329 'rule':151,222 'run':167,204,325 'safe':301 'safeti':185 'scope':144,289 'see':353 'set':302 'setup':283 'skill':70,229 'skill-421-frameworks-quarkus-testing-unit-tests' 'slow':240 'source-jabrena' 'specif':97,124 'spi':96 'stop':189 'strategi':54 'suit':164 'summar':334 'surefir':130 'target':292 'test':5,7,16,22,46,50,53,108,123,129,142,159,183,234,247,257,260 'test-specif':122 'testprofil':120 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'unit':6,15,49,233 'usag':242 'use':8,227 'user':200 'verif':326 'verifi':135,161,203,207,211,339 'wire':63 'without':75 'workflow':268 'wrap':94 'write':13","prices":[{"id":"1f9b3e10-2623-4a9d-8dee-281f86cae230","listingId":"af11764a-495a-4030-a52b-36c39436bb4d","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-18T22:02:21.753Z"}],"sources":[{"listingId":"af11764a-495a-4030-a52b-36c39436bb4d","source":"github","sourceId":"jabrena/cursor-rules-java/421-frameworks-quarkus-testing-unit-tests","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/421-frameworks-quarkus-testing-unit-tests","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:21.753Z","lastSeenAt":"2026-04-26T12:53:38.335Z"}],"details":{"listingId":"af11764a-495a-4030-a52b-36c39436bb4d","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"421-frameworks-quarkus-testing-unit-tests","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"736935d607c8fc21888d71e957e86caefa097e0d","skill_md_path":"skills/421-frameworks-quarkus-testing-unit-tests/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/421-frameworks-quarkus-testing-unit-tests"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"421-frameworks-quarkus-testing-unit-tests","license":"Apache-2.0","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. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/421-frameworks-quarkus-testing-unit-tests"},"updatedAt":"2026-04-26T12:53:38.335Z"}}