JMeter - Property File - (jmeter.properties|user.properties) - Configuration

About

If you wish to modify the properties with which JMeter runs you need to modify one of the property files.

The property files will be automatically loaded if they are found in the current directory or if they are found in the JMeter bin directory.

The default property files can be found in the /bin directory

Properties Files

jmeter.properties

With the -p command Line Option, you can define your own jmeter.properties file.

-p, --propfile <argument>
         the jmeter property file to use

user.properties

The user.properties file is used to define additional JMeter properties.

These properties are added after the initial property file, but before the -q and -J options are processed.

-q, --addprop <argument>
          additional JMeter property file(s)
-J, --jmeterproperty <argument>=<value>
          Define additional JMeter properties

system.properties

system.properties is used to update system properties such as:

  • Network and SSL properties
  • Keystore properties (client certificates)

These properties are added before the -S and -D options are processed.

-D, --systemproperty <argument>=<value> 
           Define additional system properties
-S, --systemPropertyFile <argument>
           additional system property file(s)

Others Property Files

  • saveservice.property
  • upgrade.properties

Precedence Order

The command line options and properties files are processed in the following order:

  • -p propfile
  • jmeter.properties (or the file from the -p option) is then loaded
  • -j logfile
  • Logging is initialised
  • user.properties is loaded
  • system.properties is loaded
  • all other command-line options are processed

How to

automatically load additional JMeter properties file

The below property files will be automatically loaded if they are found in the current directory or if they are found in the JMeter bin directory.

In the jmeter.properties file, just change this section:

#---------------------------------------------------------------------------
# Additional property files to load
#---------------------------------------------------------------------------

# Should JMeter automatically load additional JMeter properties?
# File name to look for (comment to disable)
user.properties=user.properties

# Should JMeter automatically load additional system properties?
# File name to look for (comment to disable)
system.properties=system.properties

Diagnostic

Unable to find the load of the property file in the log

version 2.9: The log in GUI mode doesn't show the load of the property file even if they are really loaded.

For instance, the custom user and jmeter property file are loaded but the load is not present in the log file.

2013/04/29 11:06:36 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US 
2013/04/29 11:06:36 INFO  - jmeter.JMeter: Loading system properties from: C:\apache-jmeter-2.9\bin\system.properties 
2013/04/29 11:06:36 INFO  - jmeter.JMeter: Copyright (c) 1998-2013 The Apache Software Foundation 

Documentation / Reference


Powered by ComboStrap