Simulating Irregular Response Latencies (Think Time)

One benefit of using Mock Services when testing is to introduce irregular behavior that's difficult to get a real web service to produce on demand. A test script rushes through the test steps at the same speed every time, but in BlazeMeter, a transaction can also have a fixed or random-length delay before the response is returned.

BlazeMeter's Think Time option introduces a delay that can be used as a factor to simulate slow human responses or network latency. The delay can be a fixed value or can be sampled from a random distribution which makes it easy for you to simulate different types of downstream latencies.

There are several ways how to access the Think Time tab to add a delay to a transaction:

  • Go to the Asset Catalog tab, open the transaction, and edit the Response Parameters.
  • Go to the Mock Services tab, open a Mock Service, and go to the Parameters tab.

For each transaction response, you have the following options:

Think Time

  • No Delay / Don't use transaction delay
    Sets the Think Time to 0 milliseconds. This is the default.
  • Fixed Delay
    Lets you define a fixed response delay in milliseconds.
  • Random Uniform Delay
    A uniform distribution simulates a stable latency with a fixed amount of jitter.
    Example: To simulate a stable latency of 20ms +/- 5ms, use lower = 15 and upper = 25.
    This option takes two parameters:
    • lower - The lower bound of the range, inclusive.
    • upper - The upper bound of the range, inclusive.
  • Random Lognormal Delay
    A lognormal distribution is a pretty good approximation of long-tailed latencies centered on the 50th percentile.
    This option takes two parameters:
    • median - The 50th percentile of latencies.
    • sigma - Standard deviation. The larger the value, the longer the tail.