MCPcopy
hub / github.com/wiremock/wiremock

github.com/wiremock/wiremock @3.13.2 sqlite

repository ↗ · DeepWiki ↗ · release 3.13.2 ↗
19,935 symbols 78,247 edges 944 files 126 documented · 1%
README

WireMock - flexible and open source API mocking

<a href="https://wiremock.org" target="_blank">
    <img width="512px" src="https://wiremock.org/images/logos/wiremock/logo_wide.svg" alt="WireMock Logo"/>
</a>

Build Status Docs a Participate Maven Central

WireMock is a popular open-source tool for API mock testing with over 5 million downloads per month. It can help you to create stable test and development environments, isolate yourself from flaky 3rd parties and simulate APIs that don’t exist yet.

Started in 2011 as a Java library by Tom Akehurst, now WireMock spans across multiple programming languages and technology stacks. It can run as a library or client wrapper in many languages, or as a standalone server. There is a big community behind the project and its ecosystem.

WireMock supports several approaches for creating mock APIs - in code, via its REST API, as JSON files and by recording HTTP traffic proxied to another destination. WireMock has a rich matching system, allowing any part of an incoming request to be matched against complex and precise criteria. Responses of any complexity can be dynamically generated via the Handlebars based templating system. Finally, WireMock is easy to integrate into any workflow due to its numerous extension points and comprehensive APIs.

Key Features

WireMock can run in unit tests, as a standalone process or a container. Key features include:

  • HTTP response stubbing, matchable on URL, header and body content patterns
  • Configuration via a fluent Java API, JSON files and JSON over HTTP
  • Record/playback of stubs
  • Request verification
  • Fault and response delays injection
  • Per-request conditional proxying
  • Browser proxying for request inspection and replacement
  • Stateful behaviour simulation
  • Extensibility

Full documentation can be found at wiremock.org/docs.

Questions and Issues

If you have a question about WireMock, or are experiencing a problem you're not sure is a bug please post a message to the WireMock Community Slack in the #help channel.

On the other hand if you're pretty certain you've found a bug please open an issue.

Log4j Notice

WireMock only uses log4j in its test dependencies. Neither the thin nor standalone JAR depends on or embeds log4j, so you can continue to use WireMock 2.32.0 and above without any risk of exposure to the recently discovered vulnerability.

Contributing

WireMock exists and continues to thrive due to the efforts of contributors. Regardless of your expertise and time you could dedicate, there're opportunities to participate and help the project!

See the Contributing Guide for more information.

Extension points exported contracts — how you extend this code

DelayDistribution (Interface)
Distribution that models delays. Implementations should be thread safe. [6 implementers]
src/main/java/com/github/tomakehurst/wiremock/http/DelayDistribution.java
MultipartParserLoader (Interface)
Create the Jetty's version-dependent MultipartParser instance that accepts the Jetty's major version into accoun
src/testFixtures/java/com/github/tomakehurst/wiremock/MultipartParserLoader.java
CertificateSpecification (Interface)
(no doc) [2 implementers]
src/test/java/com/github/tomakehurst/wiremock/crypto/CertificateSpecification.java
RequestBodyPatternFactory (Interface)
Factory for the StringValuePattern to use in a recorded stub mapping to match request bodies [8 implementers]
src/main/java/com/github/tomakehurst/wiremock/recording/RequestBodyPatternFactory.java
WebhookTransformer (Interface)
(no doc) [24 implementers]
src/main/java/org/wiremock/webhooks/WebhookTransformer.java
ClientAuthenticator (Interface)
(no doc) [6 implementers]
src/main/java/com/github/tomakehurst/wiremock/security/ClientAuthenticator.java
Authenticator (Interface)
(no doc) [7 implementers]
src/main/java/com/github/tomakehurst/wiremock/security/Authenticator.java

Core symbols most depended-on inside this repo

get
called by 4967
src/main/java/com/github/tomakehurst/wiremock/store/Store.java
i
called by 1463
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-bundle.js
O
called by 1458
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-bundle.js
i
called by 1391
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-es-bundle.js
push
called by 1142
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-bundle.js
set
called by 1132
src/main/java/com/github/tomakehurst/wiremock/store/SettingsStore.java
willReturn
called by 876
src/main/java/com/github/tomakehurst/wiremock/client/MappingBuilder.java
r
called by 807
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-bundle.js

Shape

Method 10,550
Function 5,806
Class 3,472
Interface 87
Enum 20

Languages

TypeScript56%
Java44%

Modules by API surface

src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-es-bundle.js4,349 symbols
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-bundle.js4,349 symbols
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-es-bundle-core.js1,115 symbols
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui.js929 symbols
src/main/resources/assets/swagger-ui/swagger-ui-dist/swagger-ui-standalone-preset.js382 symbols
src/main/java/com/github/tomakehurst/wiremock/client/WireMock.java165 symbols
src/test/java/com/github/tomakehurst/wiremock/extension/responsetemplating/ResponseTemplateTransformerTest.java132 symbols
src/main/java/com/github/tomakehurst/wiremock/core/WireMockConfiguration.java124 symbols
src/test/java/com/github/tomakehurst/wiremock/standalone/CommandLineOptionsTest.java116 symbols
src/test/java/com/github/tomakehurst/wiremock/StubbingAcceptanceTest.java94 symbols
src/test/java/com/github/tomakehurst/wiremock/VerificationAcceptanceTest.java92 symbols
src/test/java/com/github/tomakehurst/wiremock/AdminApiTest.java83 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

ch.qos.logback:logback-classic1.2.13 · 1×
com.github.tomakehurst:wiremock-jre8-standalone2.35.1 · 1×
junit:junit4.13.1 · 1×
org.slf4j:jcl-over-slf4j
org.slf4j:jul-to-slf4j
org.slf4j:log4j-over-slf4j
org.slf4j:slf4j-api
uk.org.lidalia:jul-to-slf4j-config1.0.0 · 1×
@redocly/cli1.34.3 · 1×
@scarf/scarf=1.4.0 · 1×
swagger-ui-dist5.17.14 · 1×

For agents

$ claude mcp add wiremock \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact