Use when you need to set up, review, or improve Java integration tests — including generating a BaseIntegrationTest.java with WireMock for HTTP stubs, detecting HTTP client infrastructure from import signals, injecting service coordinates dynamically via System.setProperty(), creating WireMock JSON mapping files with bodyFileName, isolating stubs per test method, verifying HTTP interactions, or eliminating anti-patterns such as Mockito-mocked HTTP clients or globally registered WireMock stubs. Part of the skills-for-java project
77
71%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/132-java-testing-integration-testing/SKILL.mdSet up robust integration-test infrastructure for Java services using WireMock to stub outbound HTTP dependencies.
What is covered in this Skill?
HttpClient, feign.*, retrofit2.*, RestTemplateBaseIntegrationTest base classWireMockExtension with @RegisterExtension, dynamic port allocation (dynamicPort())usingFilesUnderClasspath("wiremock"), @BeforeAll + System.setProperty() for coordinate propagationbodyFileName referencing wiremock/files/)withFixedDelayWIREMOCK.verifywiremock-standalone Maven dependency (test scope)@BeforeAll stubs, Mockito-mocked HTTP clients, hardcoded ports or URLsScope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Before applying any integration test changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
./mvnw compile or mvn compile before applying any change./mvnw clean verify or mvn clean verify after applying improvementsFor detailed guidance, examples, and constraints, see references/132-java-testing-integration-testing.md.
7772a1b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.