Mock Service Editor

MockService Editor

The MockService Editor lets you edit and define settings for the MockService.

A Sample Mock Service

Actions

In this example, the MockService contains two actions, one GET and one POST. They are configured in the MockAction Editor.

Description

The description is meant for storing information about the mockservice.

Description

Properties

The property editor lets you add, edit and delete properties for the MockService.

Properties

Read more about properties in Working With Properties.

Start Script

The Start Script is invoked when MockService starts.

Start Script

Typical usages for the start script is initialization

Stop Script

The Start Script runs when the MockService stops.

Stop Script

Normally this is used for cleanup and reporting.

OnRequest Script

The OnRequest Script is called when a request is received.

On Request Script

A common usage for this is to provide custom behavior for the MockService.

AfterRequest Script

The AfterRequest Script runs when a request has been handled.

AfterRequest Script

This can be used for doing data collection or reporting.

Message Log

The message log shows all messages that have been received by the MockService since it was last started.

Message Log

To see actual contents of a message, double-click it, to open it in the Message Viewer.

Message Log Options

There is only one option for the message log: how many message to store.

Message Log Options

The default value is 100.

Coverage

The coverage feature is not currently available for REST MockServices.