{"id":"fdc57840-9329-4718-9dec-85671014e1f6","shortId":"7f2WWr","kind":"skill","title":"133-java-testing-acceptance-tests","tagline":"Use when you need to implement acceptance tests from a Gherkin .feature file for framework-agnostic Java (no Spring Boot, Quarkus, Micronaut) — finding @acceptance scenarios, happy path with RestAssured, Testcontainers for DB/Kafka, WireMock for external REST. Requires .feature f","description":"# Java acceptance tests from Gherkin\n\nImplement acceptance tests from Gherkin feature files. Given a .feature file in context, find @acceptance-tagged scenarios and implement happy-path tests with RestAssured, Testcontainers, and WireMock.\n\n**What is covered in this Skill?**\n\n- Parse Gherkin .feature files to find scenarios tagged @acceptance or @acceptance-tests\n- Implement happy-path acceptance tests (one test per scenario)\n- RestAssured for REST API testing (given/when/then, status codes, JSON body assertions)\n- Testcontainers for databases (PostgreSQL, etc.) and Kafka\n- WireMock for stubbing external REST APIs\n- BaseAcceptanceTest base class with @BeforeAll coordinate propagation via System.setProperty\n- Given-When-Then structure mapping Gherkin steps to setup, request, and assertions\n- Maven dependencies: rest-assured, testcontainers, wiremock-standalone\n\n**Preconditions:** (1) The Gherkin .feature file must be in context. (2) The project must NOT use Spring Boot, Quarkus, or Micronaut — for those frameworks, use @323-frameworks-spring-boot-testing-acceptance-tests or framework-specific rules.\n\n**Scope:** Implements only happy-path scenarios. Use the reference for detailed examples and constraints.\n\n## Constraints\n\nBefore applying any acceptance test changes, ensure the Gherkin .feature file is in context and the project compiles. If compilation fails or the feature file is missing, stop immediately.\n\n- **PRECONDITION**: The Gherkin .feature file MUST be in context; the project MUST NOT use Spring Boot, Quarkus, or Micronaut\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **SAFETY**: If compilation fails, stop immediately and do not proceed\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed examples, good/bad patterns, and constraints\n\n## When to use this skill\n\n- Review Java code for acceptance tests\n- Apply best practices for acceptance tests in Java code\n\n## Workflow\n\n1. **Validate preconditions and compile project**\n\nConfirm `.feature` file is in context and framework scope is valid, then run `./mvnw compile` or `mvn compile`; stop if any precondition fails.\n\n2. **Read acceptance-testing reference and parse scenarios**\n\nRead `references/133-java-testing-acceptance-tests.md` and extract `@acceptance` scenarios for happy-path implementation.\n\n3. **Implement acceptance test infrastructure and scenarios**\n\nCreate or update base test infrastructure (RestAssured, Testcontainers, WireMock) and implement one happy-path test per accepted scenario.\n\n4. **Verify with full build**\n\nRun `./mvnw clean verify` or `mvn clean verify` after applying improvements.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/133-java-testing-acceptance-tests.md](references/133-java-testing-acceptance-tests.md).","tags":["133","java","testing","acceptance","tests","cursor","rules","jabrena","agent-skills","ai-skills","claude","claude-code"],"capabilities":["skill","source-jabrena","skill-133-java-testing-acceptance-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/133-java-testing-acceptance-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,899 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:35.376Z","embedding":null,"createdAt":"2026-04-18T22:02:01.747Z","updatedAt":"2026-04-26T12:53:35.376Z","lastSeenAt":"2026-04-26T12:53:35.376Z","tsv":"'/mvnw':269,290,352,414 '1':166,333 '133':1 '2':175,362 '3':382 '323':190 '4':408 'accept':5,13,31,48,53,67,95,98,104,196,222,321,327,365,375,384,406 'acceptance-tag':66 'acceptance-test':97,364 'agnost':23 'api':113,133 'appli':220,275,298,301,323,422 'assert':120,155 'assur':160 'base':135,392 'baseacceptancetest':134 'beforeal':138 'best':324 'bodi':119 'boot':27,182,194,263 'build':412 'chang':224,277 'class':136 'clean':291,295,415,419 'code':117,319,331 'compil':236,238,270,273,280,337,353,356 'confirm':339 'constraint':217,218,311,430 'context':64,174,232,256,344 'coordin':139 'cover':83 'creat':389 'databas':123 'db/kafka':39 'depend':157 'detail':214,306,426 'ensur':225 'etc':125 'exampl':215,307,428 'extern':42,131 'extract':374 'f':46 'fail':239,281,361 'featur':18,45,57,61,89,169,228,242,251,340 'file':19,58,62,90,170,229,243,252,341 'find':30,65,92 'framework':22,188,192,200,346 'framework-agnost':21 'framework-specif':199 'frameworks-spring-boot-testing-acceptance-test':191 'full':411 'gherkin':17,51,56,88,149,168,227,250 'given':59,144 'given-when-then':143 'given/when/then':115 'good/bad':308 'guidanc':427 'happi':33,73,102,207,379,402 'happy-path':72,101,206,378,401 'immedi':247,283 'implement':12,52,71,100,204,381,383,399 'improv':299,423 'infrastructur':386,394 'java':3,24,47,318,330 'java-testing-acceptance-test':2 'json':118 'kafka':127 'mandatori':267 'map':148 'maven':156 'micronaut':29,185,266 'miss':245 'must':171,178,253,259 'mvn':272,294,355,418 'need':10 'one':106,400 'pars':87,369 'path':34,74,103,208,380,403 'pattern':309 'per':108,405 'postgresql':124 'practic':325 'precondit':165,248,335,360 'proceed':287 'project':177,235,258,338 'propag':140 'quarkus':28,183,264 'read':302,363,371 'refer':212,304,367,424 'references/133-java-testing-acceptance-tests.md':372,432,433 'request':153 'requir':44 'rest':43,112,132,159 'rest-assur':158 'restassur':36,77,110,395 'review':317 'rule':202 'run':268,289,351,413 'safeti':278 'scenario':32,69,93,109,209,370,376,388,407 'scope':203,347 'see':431 'setup':152 'skill':86,316 'skill-133-java-testing-acceptance-tests' 'source-jabrena' 'specif':201 'spring':26,181,193,262 'standalon':164 'status':116 'step':150 'stop':246,282,357 'structur':147 'stub':130 'system.setproperty':142 'tag':68,94 'test':4,6,14,49,54,75,99,105,107,114,195,197,223,322,328,366,385,393,404 'testcontain':37,78,121,161,396 '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' 'updat':391 'use':7,180,189,210,261,314 'valid':334,349 'verifi':288,292,296,409,416,420 'via':141 'wiremock':40,80,128,163,397 'wiremock-standalon':162 'workflow':332","prices":[{"id":"03bffa61-22f3-452f-9581-b5a54ea33b0b","listingId":"fdc57840-9329-4718-9dec-85671014e1f6","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:01.747Z"}],"sources":[{"listingId":"fdc57840-9329-4718-9dec-85671014e1f6","source":"github","sourceId":"jabrena/cursor-rules-java/133-java-testing-acceptance-tests","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/133-java-testing-acceptance-tests","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:01.747Z","lastSeenAt":"2026-04-26T12:53:35.376Z"}],"details":{"listingId":"fdc57840-9329-4718-9dec-85671014e1f6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"133-java-testing-acceptance-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":"2147fbe31dbe4fbb36c575f258298c654b31ca99","skill_md_path":"skills/133-java-testing-acceptance-tests/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/133-java-testing-acceptance-tests"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"133-java-testing-acceptance-tests","license":"Apache-2.0","description":"Use when you need to implement acceptance tests from a Gherkin .feature file for framework-agnostic Java (no Spring Boot, Quarkus, Micronaut) — finding @acceptance scenarios, happy path with RestAssured, Testcontainers for DB/Kafka, WireMock for external REST. Requires .feature file in context. This should trigger for requests such as Review Java code for acceptance tests; Apply best practices for acceptance tests in Java code. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/133-java-testing-acceptance-tests"},"updatedAt":"2026-04-26T12:53:35.376Z"}}