132-java-testing-integration-testing

Set up Java integration test infrastructure with WireMock for HTTP dependency stubbing.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/shirulot/codex-skill --skill 132-java-testing-integration-testing-shirulot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 132-java-testing-integration-testing
Source: https://github.com/shirulot/codex-skill/tree/main/132-java-testing-integration-testing
Command: npx skills add https://github.com/shirulot/codex-skill --skill 132-java-testing-integration-testing-shirulot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the complexity of setting up reliable integration tests for Java services by automating the configuration of WireMock infrastructure and enforcing best practices for HTTP dependency stubbing.

Core Features & Use Cases

  • Infrastructure Topology Detection: Automatically identifies HTTP client dependencies from your project imports.
  • Standardized Scaffolding: Generates a BaseIntegrationTest class with dynamic port allocation and proper lifecycle management.
  • Best Practice Enforcement: Eliminates anti-patterns like global stub registration and Mockito-mocked HTTP clients, ensuring tests are isolated and maintainable.

Quick Start

Ask the assistant to review your current Java project and generate the necessary integration test infrastructure based on your detected HTTP client dependencies.

Frequently Asked Questions about 132-java-testing-integration-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Java integration tests with WireMock for HTTP stubbing?

Setting up Java integration tests with WireMock involves generating a BaseIntegrationTest class that handles dynamic port allocation and proper lifecycle management. This ensures per-test stub isolation and clean separation of test concerns for external HTTP dependencies.

Why should I use WireMock instead of mocking HTTP clients with Mockito?

Mocking HTTP clients with Mockito creates an anti-pattern that bypasses actual HTTP infrastructure. WireMock provides proper HTTP dependency stubbing with dynamic port allocation, ensuring tests remain isolated, maintainable, and capable of request verification.

How do I isolate WireMock stubs per test in a Java integration test suite?

Per-test stub isolation in Java integration tests requires standardized scaffolding that avoids global stub registration. By implementing proper lifecycle management, each test maintains clean separation of test concerns and prevents stub data leakage.

Can I use this Java integration testing approach with framework-agnostic services?

This WireMock integration testing approach explicitly supports framework-agnostic Java services. It automatically detects HTTP client dependencies from project imports and propagates dynamic port coordinates via System.setProperty to ensure reliable stub configuration.

What are the limitations of using WireMock for Java integration testing?

WireMock for Java integration testing requires dynamic port allocation infrastructure and compilation checks to function reliably. It is specifically limited to HTTP dependency stubbing and does not address non-HTTP external service integration.