Skip to content

__property

JMeter __property function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

Also documented in context in the full Functions and Variables reference.

TL;DR: __property reads a JMeter property (JVM-level config, not a per-thread variable) โ€” the standard way to make a test plan configurable from outside without editing the .jmx (environment name, base URL, feature flags).

The property function returns the value of a JMeter property. If the property value cannot be found, and no default has been supplied, it returns the property name. When supplying a default value, there is no need to provide a function name - the parameter can be set to null, and it will be ignored.

For example:

  • \${__property(user.dir)} - return value of user.dir
  • \${__property(user.dir,UDIR)} - return value of user.dir and save in UDIR
  • \${__property(abcd,ABCD,atod)} - return value of property abcd (or โ€œatodโ€ if not defined) and save in ABCD
  • \${__property(abcd,,atod)} - return value of property abcd (or โ€œatodโ€ if not defined) but donโ€™t save it
NameRequiredDescription
Property NameYesThe property name to be retrieved.
Variable NameNoA reference name for reusing the value computed by this function.
Default ValueNoThe default value for the property.
${__property(user.dir)} โ†’ value of the "user.dir" JMeter property
${__property(abcd,ABCD,atod)} โ†’ value of "abcd" (or "atod" default), saved to variable ABCD
${__property(abcd,,atod)} โ†’ same lookup, without saving to a variable

For properties set specifically via the -J CLI flag, __P is a shorter alternative. See the Properties Reference for JMeterโ€™s built-in tuning properties and the CLI Command Builder for constructing -J flags.

On this page