{"id":"0746a490-c864-4581-8702-a0ce33e13004","shortId":"axH6gv","kind":"skill","title":"323-frameworks-spring-boot-testing-acceptance-tests","tagline":"Use when you need to implement acceptance tests from a Gherkin .feature file for Spring Boot applications — including finding scenarios tagged @acceptance, implementing happy path tests with TestRestTemplate, @SpringBootTest, Testcontainers with @ServiceConnection for DB/Kafka, a","description":"# Spring Boot acceptance tests from Gherkin\n\nImplement acceptance tests from Gherkin feature files in Spring Boot projects. Given a .feature file in context, find @acceptance-tagged scenarios and implement happy-path tests with @SpringBootTest, TestRestTemplate, 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- @SpringBootTest(webEnvironment = RANDOM_PORT), @Autowired TestRestTemplate (auto-configured, no extra dependency)\n- @ServiceConnection for Testcontainers (Spring Boot 4.0.x) — preferred over @DynamicPropertySource\n- @DynamicPropertySource for WireMock base URLs and containers without built-in service connection support\n- TestRestTemplate for REST API testing over the full servlet/filter stack (status codes, typed DTOs, AssertJ)\n- Testcontainers for databases (PostgreSQL, etc.) and Kafka\n- WireMock for stubbing external REST APIs (not internal @Service beans)\n- @DisplayName echoing Gherkin scenario title for BDD fidelity\n- Given-When-Then structure mapping Gherkin steps to setup, HTTP call, and assertions\n\n**Preconditions:** (1) The Gherkin .feature file must be in context. (2) The project must use Spring Boot. For framework-agnostic Java, use @133-java-testing-acceptance-tests.\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 use Spring Boot\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 Spring Boot acceptance tests\n- Apply best practices for Spring Boot acceptance tests in Java code\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/323-frameworks-spring-boot-testing-acceptance-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/323-frameworks-spring-boot-testing-acceptance-tests.md](references/323-frameworks-spring-boot-testing-acceptance-tests.md).","tags":["323","frameworks","spring","boot","testing","acceptance","tests","cursor","rules","java","jabrena","agent-skills"],"capabilities":["skill","source-jabrena","skill-323-frameworks-spring-boot-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/323-frameworks-spring-boot-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 (3,119 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:37.508Z","embedding":null,"createdAt":"2026-04-18T22:02:17.201Z","updatedAt":"2026-04-26T12:53:37.508Z","lastSeenAt":"2026-04-26T12:53:37.508Z","tsv":"'/mvnw':294,315 '1':204,362 '133':226 '2':213,380 '3':400 '323':1 '4':417 '4.0':130 'accept':7,15,30,46,51,69,98,101,107,230,251,348,356 'acceptance-tag':68 'acceptance-test':100 'action':438 'agnost':223 'align':404 'api':152,176 'appli':249,300,323,326,350,399,401 'applic':25 'appropri':424 'assert':202 'assertj':163 'assess':366 'auto':120 'auto-configur':119 'autowir':117 'base':138 'bdd':187 'bean':180 'best':351 'boot':5,24,45,59,129,219,291,347,355 'build/tests':425 'built':144 'built-in':143 'call':200 'chang':253,302,379,397,405,429 'clean':316,320 'code':160,344,360 'compil':265,267,295,298,305 'configur':121 'configuration/code':409 'connect':147 'constraint':246,247,336,390,445 'contain':141 'context':66,212,261,285,368 'convent':416 'cover':86 'current':374 'databas':166 'db/kafka':42 'decid':384 'depend':124 'detail':243,331,441 'displaynam':181 'dtos':162 'dynamicpropertysourc':134,135 'echo':182 'ensur':254 'etc':168 'exampl':244,332,443 'execut':423 'extern':174 'extra':123 'fail':268,306 'featur':20,55,63,92,207,257,271,280 'fidel':188 'file':21,56,64,93,208,258,272,281 'find':27,67,95 'follow':410,436 'follow-up':435 'framework':3,222,403 'framework-agnost':221 'framework-align':402 'frameworks-spring-boot-testing-acceptance-test':2 'full':156 'gather':381 'gherkin':19,49,54,91,183,195,206,256,279 'given':61,190 'given-when-then':189 'good/bad':333 'guidanc':442 'happi':32,75,105,236 'happy-path':74,104,235 'http':199 'identifi':387 'immedi':276,308 'implement':14,31,50,73,103,233,406 'improv':324,386 'includ':26 'inspect':372 'intern':178 'java':224,228,343,359 'java-testing-acceptance-test':227 'kafka':170 'mandatori':292 'map':194 'minimum':393 'miss':274 'must':209,216,282,288 'mvn':297,319 'need':12 'one':109 'outcom':389 'pars':90 'path':33,76,106,237 'pattern':334,413 'per':111 'port':116 'postgresql':167 'practic':352 'precondit':203,277 'prefer':132 'proceed':312 'project':60,215,264,287,367,375,415 'propos':378 'random':115 'read':327,363,369 'refactor':408 'refer':241,329,364,412,439 'references/323-frameworks-spring-boot-testing-acceptance-tests.md':370,447,448 'report':421 'request':388 'rest':151,175 'result':422 'review':342 'run':293,314,418 'safe':394 'safeti':303 'scenario':28,71,96,112,184,238 'scope':232,382 'see':446 'servic':146,179 'serviceconnect':40,125 'servlet/filter':157 'set':395 'setup':198,376 'skill':89,341 'skill-323-frameworks-spring-boot-testing-acceptance-tests' 'source-jabrena' 'spring':4,23,44,58,128,218,290,346,354 'springboottest':37,79,113 'stack':158 'status':159 'step':196 'stop':275,307 'structur':193 'stub':173 'summar':427 'support':148 'tag':29,70,97 'target':385 'test':6,8,16,34,47,52,77,102,108,110,153,229,231,252,349,357 'testcontain':38,81,127,164 'testresttempl':36,80,118,149 'titl':185 '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' 'type':161 'url':139 'use':9,217,225,239,289,339 'verif':419 'verifi':313,317,321,432 'webenviron':114 'wiremock':83,137,171 'without':142 'workflow':361 'x':131","prices":[{"id":"6322d836-1f62-47f7-b796-770be9f10329","listingId":"0746a490-c864-4581-8702-a0ce33e13004","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:17.201Z"}],"sources":[{"listingId":"0746a490-c864-4581-8702-a0ce33e13004","source":"github","sourceId":"jabrena/cursor-rules-java/323-frameworks-spring-boot-testing-acceptance-tests","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/323-frameworks-spring-boot-testing-acceptance-tests","isPrimary":false,"firstSeenAt":"2026-04-18T22:02:17.201Z","lastSeenAt":"2026-04-26T12:53:37.508Z"}],"details":{"listingId":"0746a490-c864-4581-8702-a0ce33e13004","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"323-frameworks-spring-boot-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":"b8a9a909c794334ac4d2bf4632c62cf51fde3338","skill_md_path":"skills/323-frameworks-spring-boot-testing-acceptance-tests/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/323-frameworks-spring-boot-testing-acceptance-tests"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"323-frameworks-spring-boot-testing-acceptance-tests","license":"Apache-2.0","description":"Use when you need to implement acceptance tests from a Gherkin .feature file for Spring Boot applications — including finding scenarios tagged @acceptance, implementing happy path tests with TestRestTemplate, @SpringBootTest, Testcontainers with @ServiceConnection for DB/Kafka, and WireMock for external REST stubs. Requires .feature file in context. This should trigger for requests such as Review Java code for Spring Boot acceptance tests; Apply best practices for Spring Boot acceptance tests in Java code. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/323-frameworks-spring-boot-testing-acceptance-tests"},"updatedAt":"2026-04-26T12:53:37.508Z"}}