Skip to content

Variables

variables-menu

The variable page lets you configure, variables to use in your virtual users. These variables will be shared across the project, meaning they are available to any virtual user in this project. Because of that you should pay extra care when making changes since they can have an impact on several virtual users.


Variables list

Variables list

The variables page uses a layout with the list on the left and edition on the right. The list features all the usual possibilities as described in the dedicated section about lists.

Variables types

variable-type

Four types of variables are available:

Predefined variables

JMeterThread.last_sample_ok

This variable contains true or false depending on the status of the last sample executed.

Example

${JMeterThread.last_sample_ok} after a sampler ok, returns true

START.HMS

This variable contains the JMeter start time in UTC time.

Example

${START.HMS} returns 122402 for a test started at 12:24:02.

START.MS

This variable contains the JMeter start timestamp in UTC time.

Example

${START.MS} returns 1631190242724 for a test started at 12:24:02 on the 9th of september 2021.

START.YMD

This variable contains the JMeter start date in UTC time.

Example

${START.YMD} returns 20210909 for a test started on the 9th of september 2021.

TESTSTART.MS

This variable contains the test start timestamp in UTC time. It differs from the JMeter start time since it measure the effective start time of the first thread.

Example

${TESTSTART.MS} returns 1631190243262

__jmeter.U_T__

This variable contains the threadgroup name followed by virtual user number-iteration number.

Example

${__jmeter.U_T__} returns unOEv3sBYy9LOuX37AC2 1-1