Ekko Proxy WireMock Editor

The Ekko Proxy WireMock Editor lets you manage wiremocks for the proxy instances. The wiremock configuration files created by the editor are not just available to the proxy instances but can also be used in WireMock based unit tests.

Managing WireMocks

The Mock Editor is accessed from the navigation pane and lists any virtual mocks that are available to the proxy instances:

ekkoproxy wiremock management screen top part

Available WireMocks will appear in the table as shown above and are stored in a mocks folder (relative to the application).

Fields and functions

The fields and functions of this part of the WireMock management view are as follows:

Field Description
Search The search field can be used to search the table showing the available mocks. Pressing the Enter key or clicking the search button will initiate the search and filter the table showing only matches. The table header will show if it's filtered or not by displaying the filtered icon:
Link status A green link means the Ekko Proxy client is connected to the Ekko Proxy Server.
A red link means the Ekko Proxy client has been disconnected from the Ekko Proxy Server.
Compare The 'Compare' button provides the option to compare two mock files in the Compare dialog.

Note this button is only enabled when exactly two mocks are selected.
Open The 'Open' button opens a mock file in a new browser tab / window.

Note depending on browser settings then you may need to enable pop-ups for the Ekko Proxy client as otherwise the action may be blocked by the browser.
Delete Deletes the selected mock file(s) from disk.

Note this cannot be undone!

Mocks table

The mocks table contain the following columns:

Field Description
Name / Id The name or id of the wiremock. The unique id is shown if the mock has no name.
Scenario The scenario name of the wiremock if any.
Method The HTTP request method of the wiremock e.g. GET, POST etc.
Matcher The matcher type used to match the url.
Url The request url for the wiremock.
Status The HTTP response status of the wiremock e.g. 200
Filename The filename of the wiremock json file.

Note multiple messages can be selected by clicking the check box or by holding down the Ctrl key while clicking on a mock row.

Mock details

Mock details of a mock (either selected from the mocks table or directly entered) are displayed in the mock details section as shown below.

ekkoproxy settings screen

The fields on the mock details section are described below:

Field Description
Mock Name The name of the wiremock.
Priority The priority of the wiremock from 1 to 10 with 1 being highest and 10 lowest priority. Defaults to 5.

Note if a wiremock has a priority of 10 then in proxy playback mode the mock will only be considered if there is no matching recording to serve instead. Mocks with higher priority than 10 (i.e. 1 to 9) will always be considered before any proxy recordings.
Global If checked the wiremock is available to all proxy instances. If unchecked then the Proxy Port field needs to be specified making the wiremock available to the proxy instance running on that port only.
Proxy Port The proxy listening port [1 - 65535] that the wiremock should be available to. Can only be filled if the Global field is unchecked.
Scenario Name The scenario name of the wiremock if any.
Required Scenario State The required scenario state of the wiremock if any.

Note the starting state for a scenario should be 'Started'.
New Scenario State The new scenario state to set if any.

Request details

The request details section shows the request matching details of a mock:

ekkoproxy settings screen filled

The fields and functions of this part of the mock management view are:

Field Description
Method The HTTP method that a request needs to match for this mock.
Url Matcher The url matcher type for matching this mock. The matching types are:
  • equalTo - equality matching on the url path and query string
  • matching - regular expression matching on the url path and query string
  • pathEqualTo - equality matching on the url path only
  • pathMatching - regular expression matching on the url path only
  • anyUrl - matching for any url. When this is selected then no url value can be specified as the mock will match on any.
Url Value The request url / pattern value to match.
HEADERS The headers tab allows for matching on one or more request header values.

Name - the name of the header to look for.
Matching - the type of match to try and match the value with:
  • contains - matches if the a portion of the header equals the value.
  • equalTo - deems a match if the header is equal to the value.
  • equalToIgnoreCase - matches if the header is equal to the value, ignoring case.
  • matches - will match the header against the given regular expression.
Value - the header value to match.
Action - the actions for the row: move row up, move row down, delete row.
QUERY PARAMS The query params tab allows for matching on one or more request query parameter values.

Name - the name of the query parameter to look for.
Matching - the type of match to try and match the value with. See description of match type above.
Value - the query parameter value to match.
Action - the actions for the row: move row up, move row down, delete row.
COOKIES The cookies tab allows for matching on one or more request cookie values.

Name - the name of the cookie to look for.
Matching - the type of match to try and match the value with. See description of match type above.
Value - the cookie value to match.
Action - the actions for the row: move row up, move row down, delete row.
BODY PATTERNS The body patterns tab allows for matching on one or more request body values.

Matching - the type of match to try and match the value with:
  • anything - matches any body. No value required.
  • binaryEqualTo - matches if the entire binary body equals the expected value.
  • contains - matches if the a portion of the body equals the value.
  • doesNotMatch - negative regular expression match.
  • equalTo - deems a match if the body is equal to the value.
  • equalToIgnoreCase - matches if the body is equal to the value, ignoring case.
  • equalToJson - matches if the body is valid JSON and is a semantic match for the value.
  • equalToXml - matches if the attribute value is valid XML and is semantically equal to the expected XML document.
  • matches - will match the body against the given regular expression.
  • matchesJsonPath - deems a match if the attribute value is valid JSON and matches the JSON Path expression supplied. A JSON body will be considered to match a path expression if the expression returns either a non-null single value (string, integer etc.), or a non-empty object or array.
  • matchesXPath - matches if the body is valid XML and matches the XPath expression supplied. An XML document will be considered to match if any elements are returned by the XPath evaluation.
Value - the body value to match.
Action - the actions for the row: move row up, move row down, delete row.
Add row Adds a new row for the currently selected tab.

Response details

The response details section shows what the response of the mock will be:

ekkoproxy settings screen filled

The fields and functions of this part of the mock management view are:

Field Description
Status The HTTP response status for this mock.
Status Message The HTTP response status message.
HEADERS The headers tab allows for entering one or more response headers.

Name - the name of the response header.
Value - the response header value.
Action - the actions for the row: move row up, move row down, delete row.
Add row Adds a new row for the response headers.
BODY The HTTP response body.
Base64 If checked the response body should be base64 encoded.
Templating If checked the response body can contain Handlebars template code e.g. {{request.path.[0]}}.
UPDATE MOCK The Update Mock button will be available if a mock is selected in the mocks table allowing for the mock details to tbe edited and saved.

Note when updating a mock the change will not affect running proxies until these are stopped and started again.
ADD NEW MOCK The Add New Mock button will create a new mock from the mock details.

Note when adding a mock the new mock will not be available to running proxies until these are stopped and started again.


For further information on WireMock please refer to the WireMock documentation.

< Go Back