Follow

Upload Custom jmeter.properties file

You can now upload jmeter.properties file through the file tab.Once uploaded using the Files tab, it will be automatically copied to $(JMETER-HOME)/bin folder.

What is jmeter.properties file ?

Any area of JMeter Application can be controlled by JMeter Properties starting from look and feel, timestamps, log levels, output file formats and ending with low-level parameters of underlying libraries like Http Client timeouts, bind addresses, etc. used for different protocols connections.

 

What does jmeter.properties file contain ?

The jmeter.properties file contain properties to alter the following features(ref.JMeter Version 2.11):

  • Preferred GUI language
  • File format configuration for JMX and JTL files
  • XML Parser
  • SSL configuration
  • Look and Feel configuration
  • Remote hosts and RMI configuration
  • Logging Configuration
  • HTTP Java configuration
  • Commons HTTP Client configuration
  • Apache HTTP Components HTTP Client configuration (HTTPClient4)
  • Results file configuration
  • Settings that affect Sample Results
  • Upgrade property
  • JMeter Test Script recorder configuration
  • Test Script Recorder certificate configuration
  • Test Script Recorder miscellaneous configuration
  • JMeter Proxy configuration
  • HTTP Sample Response Parser configuration
  • HTML Parser configuration
  • WML Parser configuration
  • Remote batching configuration
  • JDBC Request configuration
  • OS Process Sampler configuration
  • TCP Sampler configuration
  • Summariser - Generate Summary Results - configuration (mainly applies to non-GUI mode)
  • BeanShell configuration
  • MailerModel configuration
  • CSVRead configuration
  • __time() function configuration
  • CSV Data Set configuration
  • LDAP Sampler configuration
  • Miscellaneous configuration
  • Class path configuration
  • Additional property files to load
 

How to customize jmeter.properties file ?

This properties files can be customized as per your needs.

Some of the common properties that are used for effective load testing are as follows:

 

JMeter Test Script recorder(proxy) Configuration

  • To set gap between HTTP requests while recording (Unit in ms)

proxy.pause=1000

  • To add numeric prefix Sampler names (Number of steps like 1,2) [default false]

proxy.number.requests=true

  • To set default HTTP Sampler (currently HttpClient4)

[Other Values = HTTPSampler, Java, HTTPSampler2, HttpClient3.1]

jmeter.httpsampler=HttpClient4

  • To set content-type include filter to use(recording filter which will be recording).

proxy.content_type_include=text/html|text/plain|text/xml

  • To set content-type exclude filter to use(recording filter which will not be recording).

proxy.content_type_exclude=image/.*|text/css|application/.*

  • To set Default headers to remove from Header Manager elements [Cookie and Authorization Manager are always removed]

proxy.headers.remove=If-Modified-Since,If-None-Match,Host

Note : We can also use any one option also.

  • To set binary content-type handling(by saving the request in a file)

proxy.binary.types=application/x-amf,application/x-java-serialized-object

  • To set directory(The files will be saved in this)

proxy.binary.directory=user.dir

  • To set file suffix(Files will be created with this filesuffix)

proxy.binary.filesuffix=.binary

 

Hosts&RMI Configuration

  • To define remote host[IP for remote hosts]

remote_hosts=127.0.0.1

Example For Multiple Hosts

remote_hosts=localhost:1099,localhost:2010

[With Port, multiple assign]

remote_hosts=192.168.1.28:1099,192.168.1.54:1099

  • To define RMI port to be used by the server (must start rmi registry with same port)

server_port=1099

  • To Change the port to 1234, On the server(s)

set server_port=1234

start rmiregistry with port 1234

On Windows:

SET SERVER_PORT=1234

JMETER-SERVER

On Unix:

SERVER_PORT=1234 jmeter-server

On the client:

set remote_hosts=server:1234

  • To set RMI port used by the RemoteSampleListenerImpl[Default 0 means randomly assigned].You may need to open Firewall port on the Controller machine.

client.rmi.localport=0

  • To use a specific port for the JMeter server engine(before starting the server):

server.rmi.localport=5555

  • To change the default port (1099) used to access the server:

server.rmi.port=1234

  • From JMeter 2.3.1, the JMeter server creates the RMI registry as part of the server process. To stop the server creating the RMI registry:

server.rmi.create=false

  • From JMeter 2.3.1, define the following property to cause JMeter to exit after the first test:

server.exitaftertest=true

  • To start mirror server on the port:

mirror.server.port=8081

 

Test Script Recorder(Proxy) certificate configuration

  • To set domain for command-line flags [with user-name and password]

http.proxyDomain=NTLM domain

Example :

http.proxyDomain = TESTDOMAIN [This is my company domain name]

  • To set SSL configurations

proxy.cert.directory=.

proxy.cert.file=proxyserver.jks

proxy.cert.type=JKS

proxy.cert.keystorepass=password

proxy.cert.keypassword=password

proxy.cert.factory=SunX509

proxy.ssl.protocol=SSLv3

  • If you wish to use your own keystore

proxy.cert.alias=<none>

  • The default validity for certificates created by JMeter

proxy.cert.validity=7

  • Use dynamic key generation (if supported by JMeter/JVM). If false, JMeter will revert to using a single key with no certificate.

proxy.cert.dynamic_keys=true

 

HTTPS/SSL Configuration

  • By default, SSL session contexts are now created per-thread, rather than being shared.To enable/Disable SSL session sharing:

https.sessioncontext.shared=true

  • To set Default HTTPS protocol level:

https.default.protocol=TLS(default)

https.default.protocol=SSLv3

  • To Enable multiple HTTPS protocols.

https.socket.protocols=SSLv2Hello SSLv3 TLSv1

This is needed when server does not support Socket version negotiation, which can lead to: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated or java.net.SocketException: Connection reset

  • To allow reuse of cached SSL context between iterations, set the value to 'false' to reset the SSL context each iteration.

https.use.cached.ssl.context=true

  • Start and end index to be used with keystores with many entries. [Default is 0].

https.keyStoreStartIndex=0

https.keyStoreEndIndex=0

 

HTTP Configuration

  • To set retry 3 times of HTTP Java sampler

http.java.sampler.retries=3

  • To define Http Client parameters (Commons/Apache)

httpclient.parameters.file=httpclient.parameters

hc.parameters.file=hc.parameters

Note : See httpclient.parameters/hc.parameters file in bin folder

  • To set the socket timeout 200(ms)[0 == No time out]

httpclient.timeout=200

  • To Set the http version [defaults to 1.1]

httpclient.version=1.0

  • To Define characters per second [Greater than 0 to emulate slow connections]

httpclient.socket.http.cps=0

httpclient.socket.https.cps=0

  • To enable loop back

httpclient.loopback=true

  • To Define the local host address to be used for multi-homed hosts(multi agent running)

httpclient.localaddress=1.2.3.4

  • To set retry count on http 3 or 4  [Default = 0]

httpclient3.retrycount=1

httpclient4.retrycount=1

 

HTTP sampler Configuration

  • To set Max redirects in a single sequence[Default = 5]

httpsampler.max_redirects=5

  • To set Max frame/iframe nesting depth[Default = 5]

httpsampler.max_frame_depth=5

  • To set Max await timeout (sec) when concurrent download embedded resources (Default = 60)

httpsampler.await_termination_timeout=60

  • To set no separate container for embedded resources

httpsampler.separate.container=true

  • To set ignore download fails

httpsampler.ignore_failed_embedded_resources=false

 

TCP Sampler Configuration

  • To set default handler class

tcp.handler=TCPClientImpl

  • To set byte value 111 for end of line[it will be from -128 to +127]

eolByte = 111

  • To set this to a value [outside the range -128 to +127] (to skip eol checking)

tcp.eolByte=1000

  • To set TCP Charset

tcp.charset=

Note : It is used by org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl default to Platform defaults charset as returned by Charset.defaultCharset().name().

  • To set status.prefix(start with the string, in here Status=) and suffix (strings for enclose the status response code, in here Full stop.)

tcp.status.prefix=Status=

tcp.status.suffix=.

  • To specify status.properties (property file to convert codes to messages)

tcp.status.properties=mytestfiles/tcpstatus.properties

  • To set length prefix (for LengthPrefixedBinaryTCPClientImpl implementation)[Default = 2]

tcp.binarylength.prefix.length=2

 

Logging Configuration

For primary log format, seehttp://excalibur.apache.org/apidocs/org/apache/log/format/PatternFormatter.html

If you change the default format property, it will be change.

Default format:

log_format=%{time:yyyy/MM/dd HH:mm:ss} %5.5{priority} - %{category}: %{message} %{throwable}

  • To define formats in the JMeter Logging Manager

log_format_type=default [ thread_prefix/thread_suffix]

-thread_prefix adds the thread name as a prefix to the category

-thread_suffix adds the thread name as a suffix to the category

Note: Thread name is not included by default, as it requires extra processing.

  • To change the logging format, define either log_format_type or log_format. If both are defined, the type takes precedence.Note that these properties cannot be defined using the -J or -D JMeter command-line flags, as the format will have already been determined by then however, they can be defined as JVM properties.
  • To set the log level up to package/class. Correct values are FATAL_ERROR, ERROR, WARN, INFO, and DEBUG

log_level.[package_name].[classname]=[PRIORITY_LEVEL]

Example :

log_level.jmeter=INFO

log_level.jmeter.junit=DEBUG

log_level.jmeter.control=DEBUG

log_level.jmeter.testbeans=DEBUG

log_level.jmeter.engine=DEBUG

log_level.jmeter.threads=DEBUG

log_level.jmeter.gui=WARN

log_level.jmeter.testelement=DEBUG

log_level.jmeter.util=WARN

log_level.jmeter.util.classfinder=WARN

log_level.jmeter.test=DEBUG

log_level.jmeter.protocol.http=DEBUG

  • For Cookie/Auth manager

log_level.jmeter.protocol.http.control=DEBUG

log_level.jmeter.protocol.ftp=WARN

log_level.jmeter.protocol.jdbc=DEBUG

log_level.jmeter.protocol.java=WARN

log_level.jmeter.testelements.property=DEBUG

log_level.jorphan=INFO

  • To categorize a log file

log_file.[category]=[filename]

Note : Category is equivalent to package/class name described above.

  • To logs separately for Jmeter and Jorphan

log_file.jorphan=jorphan.log

log_file.jmeter=jmeter.log

  • To log Combined(jmeter + jorphan)

log_file=jmeter.log

  • To set log level

log_level.org.apache.commons.httpclient=debug

  • To log Authenticator

log_level.org.apache.commons.httpclient.Authenticator=trace

  • To Show headers only

log_level.httpclient.wire.header=debug

  • To set separate file for wire debug

log_level.httpclient.wire=debug

log_file.httpclient=httpclient.log

  • To Enable header wire + context logging[Best for Debugging]

log_level.org.apache.http=DEBUG

log_level.org.apache.http.wire=ERROR

  • To Enable full wire + context logging

log_level.org.apache.http=DEBUG

  • To Enable context logging for connection management / request execution

log_level.org.apache.http.impl.conn=DEBUG

log_level.org.apache.http.impl.client=DEBUG

log_level.org.apache.http.client=DEBUG

 

Classpath Configuration

Classpath configuration

  • To define for searching JMeter Extensions(Do not use this for utility jars). These are just additional to default lib/ext.

search_paths=/app1/lib;/app2/lib

  • To define additional class path for utility jars or JUnit test cases

user.classpath=../classes;../jars/jar1.jar

  • To specify the class finder for GUI/Non GUI mode classes.

classfinder.functions.contain=.functions.

classfinder.functions.notContain=.gui.

Note : The classpath finder currently needs to load every single JMeter class to find the classes it needs.For non-GUI mode, it's only necessary to scan for Function classes, but all classes are still loaded. All current Function classes include ".function." in their name, and none include ".gui." in the name.

Additional property files to load

  • To set additional properties, we can change by either editing those property file or assign those property with our custom property file and assign them here.

user.properties=user.properties

system.properties=system.properties

 

Cookie Manager Configuration

  • To Enable/Disable deleting null/empty Cookie  by Cookie Manager [Default is true]

CookieManager.delete_null_cookies=true

  • To Enable/Disable variable cookies by Cookie Manager [ Default is true]

CookieManager.allow_variable_cookies=true

  • To Enable/Disable save cookie as variables by Cookie Manager [Default is false]

CookieManager.save.cookies=false

  • To set prefix with cookie name before storing by Cookie Manager [Default is COOKIE_]

CookieManager.name.prefix=COOKIE_

  • To Enable/Disable checking validity of a cookie before saving by Cookie Manager[Default is true]

CookieManager.check.cookies=true

 

Parsers Configuration

  1. HTTPSampleResponse Parser configuration
  • To set the parsers [Space-separated list of parser groups].For each parser, there should be a parser.types and a parser.className property

HTTPResponse.parsers=htmlParser wmlParser

  1. HTML Parser configuration
  • To set HTML parser Class Name

Note: This new parser (since 2.10) should perform better than all others

htmlParser.className=org.apache.jmeter.protocol.http.parser.HtmlParserHTMLParser

Other parsers:

htmlParser.className=org.apache.jmeter.protocol.http.parser.HtmlParserHTMLParser

htmlParser.className=org.apache.jmeter.protocol.http.parser.JTidyHTMLParser

htmlParser.className=org.apache.jmeter.protocol.http.parser.RegexpHTMLParser

  • To set pursing file type

htmlParser.types=text/html application/xhtml+xml application/xml text/xml

  1. WML Parser configuration
  • To define pursing class(you can use your own developed purser class)

wmlParser.className=org.apache.jmeter.protocol.http.parser.RegexpHTMLParser

  • To set pursing file type(default, text type, vnd.wap.wml)

wmlParser.types=text/vnd.wap.wml  

 

JMeter engine and others

  • To stop controller accessing variables before creation (like old JMeter 2.0.3) uncomment this

jmeterthread.startearlier=false

  • To run PostProcessors reverse(like old times) uncomment this

jmeterthread.reversePostProcessors=true

  • To stop notifying listeners after run to access variables(like old behavior), uncomment this

jmeterengine.startlistenerslater=false

  • To set time(ms) to wait for stopping a thread

jmeterengine.threadstop.wait=5000

  • To invoke System.exit(0) in server exit code after stopping RMI

jmeterengine.remote.system.exit=false

  • To call System.exit(1) on failure to stop threads in non-GUI mode.(If disabled, it may be necessary to kill the JVM externally)

jmeterengine.stopfail.system.exit=true

  • To set pause time(ms) in the daemon thread before reporting that the JVM has failed to exit.

If the value is <= 0, the JMeter does not start the daemon thread

jmeter.exit.check.pause=2000

  • If running non-GUI, then JMeter listens on the following port for a shutdown message.To disable, set the port to 1000 or less.

jmeterengine.nongui.port=4445

  • If the initial port is busy, keep trying until this port is reached(to disable searching, set the value less than or equal to the .port property)

jmeterengine.nongui.maxport=4455

  • To set time(ms) to check for shutdown during ramp-up

jmeterthread.rampup.granularity=1000

  • To expand test plan tree on load [default false]

onload.expandtree=false

  • To set max size of HTML page to display[default=200 * 1024, Set to 0 to disable the size check]

view.results.tree.max_size=0

  • To disable JMS Point-to-Point Sampler from using the properties java.naming.security.[principal|credentials] when creating the queue connection.(un-comment this line)

JMSSampler.useSecurity.properties=false

  • To enable/disable delete confirmation dialogue

confirm.delete.skip=false

  • To set the size of document Cache(Web service Sampler (SOAP))

soap.document_cache=50

  • To set the size of compiled scripts cache(JSR223 elements)

jsr223.compiled_scripts_cache_size=100

 

BeanShell Configuration

  • To Define the port number as non-zero to start the http BeanShell Server on that port

beanshell.server.port=9000

Note : The telnet server will be started on the next port.

  • To Set the server initialization file(in path)

beanshell.server.file=../extras/startup.bsh

  • To Define a file(path) to be processed at startup.This is processed using its own interpreter.

beanshell.init.file=

  • To set the initialization files for BeanShell Sampler, Function and other BeanShell elements

beanshell.sampler.init=BeanShellSampler.bshrc

beanshell.function.init=BeanShellFunction.bshrc

beanshell.assertion.init=BeanShellAssertion.bshrc

beanshell.listener.init=etc

beanshell.postprocessor.init=etc

beanshell.preprocessor.init=etc

beanshell.timer.init=etc

Note : BeanShell test elements do not share interpreters. Each element in each thread has its own interpreter. This is retained between samples.The file BeanShellListeners.bshrc contains sample definitions of Test and Thread Listeners.

 

CSVRead/ Dateset/ Time Configuration

  • To  set the separator  characters, or these will be included in the list of valid delimiters

csvread.delimiter=, (Default)

csvread.delimiter=;

csvread.delimiter=!

csvread.delimiter=~

csvread.delimiter=\t

  • To set a String to return at EOF (if recycle not used)

csvdataset.eofstring=<EOF>

  • To define the default formats of _time() configuration.

time.YMD=yyyyMMdd

time.HMS=HHmmss

time.YMDHMS=yyyyMMdd-HHmmss

time.USER1=

time.USER2=

 

Results File Configuration

  • To set results file type(xml/csv)

jmeter.save.saveservice.output_format=xml

  • To set encoding (default ISO-8859-1)

sampleresult.default.encoding=ISO-8859-1

  • To set saving parameters [True parameters will be saved]

jmeter.save.saveservice.assertion_results_failure_message=false[Only for CSV]

jmeter.save.saveservice.assertion_results=none [none, first, all]

jmeter.save.saveservice.data_type=true

jmeter.save.saveservice.label=true

jmeter.save.saveservice.response_code=true [Not for CSV]

jmeter.save.saveservice.response_data=false [Save Response Data on fail]

jmeter.save.saveservice.response_data.on_error=false

jmeter.save.saveservice.response_message=true

jmeter.save.saveservice.successful=true

jmeter.save.saveservice.thread_name=true

jmeter.save.saveservice.time=true

jmeter.save.saveservice.subresults=true

jmeter.save.saveservice.assertions=true

jmeter.save.saveservice.latency=true

jmeter.save.saveservice.samplerData=false

jmeter.save.saveservice.responseHeaders=false

jmeter.save.saveservice.requestHeaders=false

jmeter.save.saveservice.encoding=false

jmeter.save.saveservice.bytes=true

jmeter.save.saveservice.url=false

jmeter.save.saveservice.filename=false

jmeter.save.saveservice.hostname=false

jmeter.save.saveservice.thread_counts=true

jmeter.save.saveservice.sample_count=false

jmeter.save.saveservice.idle_time=false

jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS[our choice]

jmeter.save.saveservice.default_delimiter=\t[For TAB character separator for CSV, a comma , is also accepted]

jmeter.save.saveservice.print_field_names=false [CSV only]

  • To see results with Nano Second Parameter

sampleresult.useNanoTime=true

  • To disable the background thread[result threads]

sampleresult.nanoThreadSleep=-1

Note : Values >=0 will keep the thread sleep (Nano Second Unit.)

  • To Save the start time stamp instead of the end, effective for result files also.

sampleresult.timestamp.start=true

  • To save list variable names with values in the result data files, we use commas to separate the names.

sample_variables=SESSION_ID,REFERENCE

Note : Currently it saves the values in XML as attributes,so the names must be valid XML names.

  • To set network response size in calculation method

Note : Size = Number of bytes for response body return by web server. If it is false, the (uncompressed) response data size will used (default before JMeter 2.5)

Include headers: Add the headers size in real size

sampleresult.getbytes.body_real_size=true

sampleresult.getbytes.headers_size=true

  • To set Prefix to identify file names that are relative to the current base

jmeter.save.saveservice.base_prefix=~/

 

Summariser - Generate Summary Results - Configuration (mainly applies to non-GUI mode)

  • To set the name for automatically start(in Non-GUI)

summariser.name=summary

  • To set interval(second) between summaries [Default 30 sec]

summariser.interval=30

  • To enable write messages to log file

summariser.log=true

  • To enable write messages to System.out

summariser.out=true

 

MailerModel / LDAP Sampler Configuration

Mailer Model Configuration

(It is a kind of Listener and will be useful if you integrate mailing system/logging)

  • To set the number of successful samples before a message is sent

mailer.successlimit=2

  • To set Number of failed samples before a message is sent

mailer.failurelimit=2

LDAP Sampler Configuration

  • To set the Max. number of search results to be sorted(0=turn off all sorting)

ldapsampler.max_sorted_results=1000

  • To set the Number of characters to log for each of three sections(starting matching section, diff. section, ending matching section where not all sections will appear for all diffs) diff display when an Equals assertion fails. A value of 100 means a maximum of 300 characters of diff text will be displayed.

assertion.equals_section_diff_len=100

Note : A number of extra characters needed like "..." and "[[["/"]]]" which are used to decorate it.

  • To set test written out to log to signify start/end of diff delta

assertion.equals_diff_delta_start=[[[

assertion.equals_diff_delta_end=]]]

 

Remote Batching Configuration

  • To set Sample sender configuration [true = client (default), false=server]

sample_sender_client_configured=true

  • To set remote batching support

mode=Standard

Other values :

Standard= returns each sample synchronously(default)

Hold = retains samples until end of test (need memory)

Batch = returns samples in batches

Statistical = returns sample summary statistics

Spatial combined values : Stripped, StrippedBatch.

StrippedBatch mode will remove some data from the Sample Results as the response body and it will send Sample Results as Batches (low resource using).

  • To load a class of an implementation of org.apache.jmeter.samplers.SampleSender

mode=org.example.load.MySampleSender

  • To Set key statistical samples on thread Name (false for Thread Group)

key_on_threadname=true

  • DiskStore: For Hold mode, but serializes the samples to disk, rather than saving in memory.

mode=DiskStore

Note: the mode is currently resolved on the client, other properties (e.g. time_threshold) are resolved on the server.

  • To set for holding samples up to 100

hold_samples=true

num_sample_threshold=100

  • To set threshold time(ms)

time_threshold=60000

  • Asynchronous sender: To use a queue and background worker process to return the samples.To set queue size to 100 [Asynch Mode]

asynch.batch.queue.size=100

  • To set the Monitor Health Visualizer buffer size to 800

monitor.buffer.size=800

 

Want to learn more? You'll want to view our on-demand recording, How to Create Advanced Load Testing Scenarios with JMeter

 

Want to learn more about JMeter properties? Read our blog post Apache JMeter Properties Customization Guide.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.