WireMocha
WireMocha is a plugin for IntelliJ-based IDEs that provides framework integration for the WireMock library.
It offers various tools to generate and validate WireMock related test code, and to provide additional contextual information, both in the JSON and Java DSLs.
The list of supported IDEs include all free versions of IntelliJ (Community, Educational, etc.) as well as Ultimate.
License and trial period
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.
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, if not all of them 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
- HTTP Client (optional, only in IntelliJ Ultimate): WireMock Admin API specific live templates and request generation based on Java code
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 | + |
Built-in 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 provides some additional features.