Mock Action Editor

Mock Action Editor

The action editor lets you define and edit the actions for a MockService.

MockAction Editor

Method

The Method for the action can be changed inside the action editor.

MockAction Method

Resource Path

The Resource Path is editable.

Resource Path

MockResponses

The MockResponses tab shows a list of all responses that are defined for the action.

MockResponses

Dispatch

The Dispatch setting defines the MockService behaviour for responses in the action.

Currently, the following methods are available for REST MockServices:

  • Sequence - Send each response in sequence.
  • Script - handle responses with a script.

Sequence Dispatch

With Sequence dispatch, each response is sent in turn. When reaching the end of the list, dispatch stars over from the beginning.

Dispatch

Script Dispatch

The Script dispatch method allows for more dynamic handling of the responses.

Dispatch

Default Response

The Default Response will be used if the script does not return another response.

Script Window

Enter the script handling the response into the script field.

More information

Read more about mock service scripting in the Creating Dynamic MockServices article.