wiremock-standalone-docker

Solid

Provides patterns and configurations for running WireMock as a standalone Docker container. Generates mock HTTP endpoints, creates stub mappings for testing, validates integration scenarios, and simulates error conditions. Use when you need to mock APIs, create a mock server, stub external services, simulate third-party APIs, or fake API responses for integration testing.

DevOps & Infrastructure 261 stars 29 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

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

Skill Content

# WireMock Standalone Docker Skill ## Overview Provides patterns for running WireMock as a standalone Docker container to mock external APIs during integration and end-to-end testing. Runs WireMock as a separate service that simulates real API behavior for testing HTTP clients, retry logic, and error handling. ## When to Use Use when you need to: - Mock external APIs during integration or end-to-end testing - Simulate error conditions (timeouts, 5xx, rate limiting) without real services - Test HTTP client configurations, retry logic, and error handling - Create portable, reproducible test environments - Validate API contracts before implementing the real service ## Instructions ### Step 1: Set Up Docker Compose Create a `docker-compose.yml` with WireMock 3.5.2, port mapping, and volume mounts for mappings and files: ```yaml version: "3.8" services: wiremock: image: wiremock/wiremock:3.5.2 ports: - "8080:8080" volumes: - ./wiremock:/home/wiremock command: ["--global-response-templating"] ``` ### Step 2: Create Directory Structure Create the WireMock configuration directories: ``` wiremock/ ├── mappings/ # JSON stub definitions └── __files/ # Response body files ``` ### Step 3: Define API Mappings Create JSON stub files in `wiremock/mappings/` for each scenario: - **Success**: Return 200 with JSON body - **Not Found**: Return 404 - **Server Error**: Return 500 - **Timeout**: Use `fixedDelayMilliseconds` - **Rate Limit**: Return 42...

Details

Author
giuseppe-trisciuoglio
Repository
giuseppe-trisciuoglio/developer-kit
Created
7 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Solid

unit-test-wiremock-rest-api

Provides patterns for unit testing external REST APIs using WireMock. Stubs API responses, verifies request details, simulates failures (timeouts, 4xx/5xx errors), and validates HTTP client behavior without real network calls. Use when testing service integrations with external APIs or mocking HTTP endpoints.

261 Updated 1 weeks ago
giuseppe-trisciuoglio
Testing & QA Solid

702-technologies-wiremock

Use when you need framework-agnostic WireMock guidance — stub design, JSON or programmatic mappings, precise request matching, response bodies and faults, classpath fixtures, isolation and reset between tests, verification of calls, dynamic ports and base URLs, and avoiding flaky stubs — without choosing Spring Boot, Quarkus, or Micronaut. Part of the skills-for-java project

393 Updated today
jabrena
Testing & QA Listed

wiremock-stub

WireMock stub conventions for HTTP integration tests. Stub mapping JSON format, scenario-based stateful stubs, request matching strategies, fault injection. Auto-loads when editing `src/test/**/*Wiremock*.java` or `**/__stubs/*.json`.

1 Updated yesterday
taipt1504
Testing & QA Solid

132-java-testing-integration-testing

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. This should trigger for requests such as Review Java code for integration tests; Apply best practices for integration tests in Java code. Part of cursor-rules-java project

393 Updated today
jabrena
AI & Automation Featured

mocking-apis

Generate mock API servers for testing and development with realistic response data. Use when creating mock APIs for development and testing. Trigger with phrases like "create mock API", "generate API mock", or "setup mock server".

2,266 Updated today
jeremylongshore