WireMocha
WireMocha is an IntelliJ-based plugin that provides integration for the WireMock framework and the ecosystem around it.
It offers various tools to generate and validate WireMock related test code, to provide additional contextual information both in the JSON and Java DSLs, and to interact with running WireMock servers.
Supported IDEs, trial period and license
The plugin is available via a paid license that you can purchase on the JetBrains Marketplace. You can find more information about pricing and licensing options there, including a 14-day trial period.
The list of supported IDEs include all free versions of IntelliJ (Community, Educational, etc.) as well as Ultimate.
Issues and feature requests
If you found a bug, have a feature request, or just a question regarding the plugin’s functionality, you can raise them on the Issues tab in the WireMocha GitHub repository.
Dependencies
WireMocha depends on a few specific plugins whose absence alters the functionality of the plugin, and turns off the following features. Most ones are bundled with the IDE:
- JUnit (optional): JUnit Rule and extension field generation actions (see JUnit 4 Rules and JUnit 5 Extensions)
- IntelliLang (optional): various language injections (see Language Injections)
- XPathView+XSLT (optional): XPath specific language injections
- JSONPath (optional): JSONPath specified language injections
- Handlebars/Mustache (optional): Handlebars specific language injections (see Response templating)
- HTTP Client (optional, only in IntelliJ Ultimate): WireMock Admin API specific live templates and request generation based on Java code
- JSON (optional): various JSON specific features in stub mapping files
- Protocol Buffers (optional): helper features for the wiremock-grpc-extension (see Stubbing and Request Matching)
Documentation
The documentation is split by functionatlity. It also incorporates custom badges to mark the following:
the type of IDE feature the functionality is implemented as
the plugin version the feature was introduced in
the feature requires a non-bundled plugin to be installed and enabled
the feature requires a bundled plugin to be installed and enabled
the feature is available only in IntelliJ Ultimate. For instance, this is the case for features using the Http Client plugin, since it is available only in Ultimate and paid JetBrains IDEs.
The + markings below mean if the corresponding documentations contain details about those DSLs.
Feature areas | JSON DSL | JAVA DSL | Includes features from … |
---|---|---|---|
Stubbing | + | + | grpc-extension |
Mapping files | + | ||
Request matching | + | + | state-extension grpc-extension |
Response templating and Handlebars helpers | + | + | state-extension, faker-extension |
JUnit 4 Rules and JUnit 5 Extensions | + | ||
WireMockConfiguration | + | ||
Language Injections | + | + | state-extension |
PostServeActions and ServeEventListeners | + | + | state-extension |
WireMock Admin API | + | ||
WireMock Tool Window | |||
Testcontainers modules | + | testcontainers-java | |
Miscellaneous | + |
Other WireMock support in IntelliJ IDEA
IntelliJ IDEA itself also provides some Spring related features for WireMock. You can find more details about it in IntelliJ IDEA 2022.2 EAP 5: Support for Spring 6…
It also has its standalone plugin called WireMock that, with a minimal overlap, provides additional features so that its and WireMocha’s feature set nicely complement each other.