Response Properties

The Response Properties section allows you to modify the response HTTP properties:

HTTP Status Code

By default, a response is sent back with HTTP 200.

However, for some responses, it is a requirement to use a different status. SOAP Fault, for instance, needs to have HTTP 500, and demand for authorization should have HTTP 401.

Content Type

This sets the response Content-Type HTTP header.

By default, MockMotor appends the charset=UTF-8 part to the header. If you need to send the response in another character set, specify this part explicitly:

text/plain; charset=windows-1251


This delay value is important for load testing.

Static Delay

When the value is 0, MockMotor returns the response as fast as possible.

However, when the value is above 0, MockMotor adds a delay to make the client-visible response time as close to the provided value as possible.

There is a randomization of the response time in a ±10% range.

Range Delay

You can also specify your own response time range in 500...800 format, i.e. the response time is evenly distributed in a 500ms to 800ms interval.

Distribution Delay

There is also a more flexible though more complex way to control the response time distribution: buckets:

10:100..200 80:200..800 10:800..1000

This expression means that for 10 cases in 100, the response time will be in a 100ms to 200ms interval, for 80 cases of 100 - in a 200ms to 800ms interval, and for another 10 cases - in an 800ms to 1000ms interval. By adding more buckets, you can form pretty complex response time distributions.

Scripted Delay

The delay value is scriptable and can use the same variables as the payload field plus response (aka output) variable.

For instance, if the real backend takes longer when you pass it multiple accounts, we can set the delay to reflect that.

Here the response time is set to 250ms + extra 500ms for each account:

250 + accounts.length * 500