Professional Documents
Culture Documents
Mockserverusingwiremock 181120194302
Mockserverusingwiremock 181120194302
Mockserverusingwiremock 181120194302
mockable.io
WHY TO
MOCK
External APIs
● Authentication
● Rights
● Send requests, alerts, emails
WireMock
Maven Gradle
Standard WireMock JAR Standard WireMock JAR
<dependency> testCompile "com.github.tomakehurst:wiremock:2.19.0"
<groupId>com.github.tomakehurst</groupId>
</dependency>
Or standalone JAR
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>2.19.0</version>
</dependency>
JUnit 4.x
@Rule
wireMockServer.start();
// Do some stuff
WireMock.reset();
wireMockServer.stop();
Demo with
stand alone
Wiremock client
Demo with code
Method: POST
Server: webhook
Event
Path: /events Method: POST
generator A
Server: alert_server
Path: /alert
Webhooks Send alerts
Event
generator B
Thank you!