Set up robust integration-test infrastructure for Java services using WireMock to stub outbound HTTP dependencies.
Prerequisites: Run ./mvnw compile or mvn compile before applying any change. If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition.
Core areas: Infrastructure topology detection (scanning imports for HttpClient, feign., retrofit2., RestTemplate, etc.), abstract BaseIntegrationTest base class, WireMockExtension with @RegisterExtension, dynamic port allocation (dynamicPort()), usingFilesUnderClasspath("wiremock"), @BeforeAll + System.setProperty() for coordinate propagation, concrete test classes extending the base class, WireMock JSON mapping f...
HTTP 스텁용 WireMock을 사용하여 BaseIntegrationTest.java 생성, 가져오기 신호에서 HTTP 클라이언트 인프라 감지, System.setProperty()를 통해 동적으로 서비스 좌표 주입, bodyFileName으로 WireMock JSON 매핑 파일 생성, 테스트 메서드별로 스텁 격리, HTTP 상호 작용 확인 또는 Mockito 모의 HTTP 클라이언트 또는 전역적으로 등록된 WireMock 스텁과 같은 안티 패턴 제거 등 Java 통합 테스트를 설정, 검토 또는 개선해야 할 때 사용합니다. Skills-for-Java 프로젝트의 일부 출처: jabrena/cursor-rules-java.