133-java-testing-acceptance-tests

Solid

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

Testing & QA 393 stars 78 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 92/100

Stars 20%
86
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Java acceptance tests from Gherkin Implement 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. **What is covered in this Skill?** - Parse Gherkin .feature files to find scenarios tagged @acceptance or @acceptance-tests - Implement happy-path acceptance tests (one test per scenario) - RestAssured for REST API testing (given/when/then, status codes, JSON body assertions) - Testcontainers for databases (PostgreSQL, etc.) and Kafka - WireMock for stubbing external REST APIs - BaseAcceptanceTest base class with @BeforeAll coordinate propagation via System.setProperty - Given-When-Then structure mapping Gherkin steps to setup, request, and assertions - Maven dependencies: rest-assured, testcontainers, wiremock-standalone **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. **Scope:** Implements only happy-path scenarios. Use the reference for detailed examples and constraints. ## Constraints Before 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. - **PRECONDITION**: The Gherkin .feature file MUST be in context; the ...

Details

Author
jabrena
Repository
jabrena/cursor-rules-java
Created
1 years ago
Last Updated
today
Language
Java
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

323-frameworks-spring-boot-testing-acceptance-tests

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. Part of the skills-for-java project

393 Updated today
jabrena
Testing & QA Solid

423-frameworks-quarkus-testing-acceptance-tests

Use when you need to implement acceptance tests from a Gherkin .feature file for Quarkus applications — including @acceptance scenarios, @QuarkusTest, BaseAcceptanceTest with QuarkusTestResourceLifecycleManager for Testcontainers and WireMock, REST Assured for full HTTP pipeline testing, WireMock JSON mapping files (classpath:wiremock/mappings/), *AT suffix naming, and Maven Surefire/Failsafe three-tier split. Requires the .feature file in context. Part of the skills-for-java project

393 Updated today
jabrena
Testing & QA Solid

523-frameworks-micronaut-testing-acceptance-tests

Use when you need to implement acceptance tests from a Gherkin .feature file for Micronaut applications — @acceptance scenarios, @MicronautTest, HttpClient, BaseAcceptanceTest with TestPropertyProvider for Testcontainers and WireMock, *AT suffix, Failsafe. Requires the .feature file in context. Part of the skills-for-java project

393 Updated today
jabrena
Testing & QA Solid

131-java-testing-unit-testing

Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions (RIGHT-BICEP, CORRECT, A-TRIP), leveraging JSpecify null-safety annotations, or eliminating testing anti-patterns such as reflection-based tests or shared mutable state. This should trigger for requests such as Review Java code for unit tests; Apply best practices for unit tests in Java code. Part of cursor-rules-java project

393 Updated today
jabrena
Testing & QA Listed

java-testing

Trigger: Java tests, JUnit, Mockito, AssertJ, legacy code, characterization tests, seams. Generate and retrofit Java tests safely.

0 Updated 1 weeks ago
andresnator