lokeshgnanasekhar / WireMockStubsRepo

WireMock Stubs demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WireMockStubsRepo

This Java Project demo's all the functionalities of WireMock by creating stubs

  • WireMockRunner class - Holds Responsibility for running stubs
  • WireMockStubs class - Will have all different functionality defined as a stubs / Mock

To Build

`.\gradle build'

To Run

.\gradle Run

If you need to add any new stub go to WireMockStubs.java and add you own stub. calling stub is automatically taken care in the code.

By default this code will run WireMock Server in 9997 port .So, When you test, you need to use http://localhost:9997/mockapiendpoint.

Examples

http://localhost:9997/simpleMock

http://localhost:9997/jsonResponseMock

http://locahost:9997/delayed

http://localhost:9997/template?searchFor=WireMock

Note: You can change to any other port if you require.
Any new stub if you add you need to stop the server / Program and should Re-run to make stub work.

About

WireMock Stubs demo


Languages

Language:Java 100.0%