- 0 Overview¶
- 4.1 JMeter’s Classpath¶
- 4.3 Using JMeter behind a proxy¶
- 4.7 Logging and error messages¶
- 4.8 Full list of command-line options¶
- Associating requests with responses
- Capturing binary post data
- Installing the certificate in firefox
- Test plan¶
- Thread group¶
- Where do samples get recorded?
- .5 Using a different sample sender¶
0 Overview¶
When using JMeter you will usually follow this process:
4.1 JMeter’s Classpath¶
JMeter automatically finds classes from jars in the following directories:
- JMETER_HOME/lib
- used for utility jars
- JMETER_HOME/lib/ext
- used for JMeter components and plugins
If you have developed new JMeter components,
then you should jar them and copy the jar into JMeter’s lib/ext directory.
JMeter will automatically find JMeter components in any jars found here.
Do not use lib/ext for utility jars or dependency jars used by the plugins;
it is only intended for JMeter components and plugins.
If you don’t want to put JMeter plugin jars in the lib/ext directory,
then define the property search_paths in jmeter.properties.
Utility and dependency jars (libraries etc) can be placed in the lib directory.
4.3 Using JMeter behind a proxy¶
If you are testing from behind a firewall/proxy server, you may need to provide JMeter with
the firewall/proxy server hostname and port number. To do so, run the jmeter[.bat] file
from a command line with the following parameters:
4.7 Logging and error messages¶
Here is an example log4j2.xml file which defines two log appenders and loggers for each category.
4.8 Full list of command-line options¶
Invoking JMeter as “jmeter -?” will print a list of all the command-line options.
These are shown below.
Associating requests with responses
If you define the property proxy.number.requests=true
JMeter will add a number to each sampler and each response.
Note that there may be more responses than samplers if excludes or includes have been used.
Responses that have been excluded will have labels enclosed in [ and ], for example [23 /favicon.ico]
Capturing binary post data
JMeter is able to capture binary POST data.
To configure which content-types are treated as binary, update the JMeter property proxy.binary.types.
The default settings are as follows:
Installing the certificate in firefox
Choose the following options:
Test plan¶
The Test Plan is where the overall settings for a test are specified.
Static variables can be defined for values that are repeated throughout a test, such as server names.
For example the variable SERVER could be defined as www.example.com, and the rest of the test plan
could refer to it as ${SERVER}. This simplifies changing the name later.
If the same variable name is reused on one of more
User Defined Variables Configuration elements,
the value is set to the last definition in the test plan (reading from top to bottom).
Such variables should be used for items that may change between test runs,
but which remain the same during a test run.
Note that the Test Plan cannot refer to variables it defines.
If you need to construct other variables from the Test Plan variables,
use a
User Defined Variables
test element.
Selecting Functional Testing instructs JMeter to save the additional sample information
– Response Data and Sampler Data – to all result files.
This increases the resources needed to run a test, and may adversely impact JMeter performance.
If more data is required for a particular sampler only, then add a Listener to it, and configure the fields as required.
The option does not affect CSV result files, which cannot currently store such information.
Also, an option exists here to instruct JMeter to run the Thread Group serially rather than in parallel.
Run tearDown Thread Groups after shutdown of main threads:
if selected, the tearDown groups (if any) will be run after graceful shutdown of the main threads.
The tearDown threads won’t be run if the test is forcibly stopped.
Test plan now provides an easy way to add classpath setting to a specific test plan.
The feature is additive, meaning that you can add jar files or directories,
but removing an entry requires restarting JMeter.
Note that this cannot be used to add JMeter GUI plugins, because they are processed earlier.
However it can be useful for utility jars such as JDBC drivers. The jars are only added to
the search path for the JMeter loader, not for the system class loader.
JMeter properties also provides an entry for loading additional classpaths.
In jmeter.properties, edit “user.classpath” or “plugin_dependency_paths” to include additional libraries.
See JMeter’s Classpath and
Configuring JMeter for details.
Thread group¶
Since JMeter 3.0, you can run a selection of Thread Group by selecting them and right clicking. A popup menu will appear:

Notice you have three options to run the selection of Thread Groups:
- Start
- Start the selected thread groups only
- Start no pauses
- Start the selected thread groups only but without running the timers
- Validate
- Start the selected thread groups only using validation mode. Per default this runs the Thread Group in validation mode (see below)
Validation Mode:
This mode enables rapid validation of a Thread Group by running it with one thread, one iteration, no timers and no
Startup delay
set to
0
.
Behaviour can be modified with some properties by setting in
Where do samples get recorded?
JMeter places the recorded samples in the Target Controller you choose. If you choose the default option
“Use Recording Controller”, they will be stored in the first Recording Controller found in the test object tree (so be
sure to add a Recording Controller before you start recording).
.5 Using a different sample sender¶
Listeners in the test plan send their results back to the client JMeter which writes the results to the specified files
By default, samples are sent back synchronously as they are generated.
This can affect the maximum throughput of the server test; the sample result has to be sent back before the thread can
continue.
There are some JMeter properties that can be set to alter this behaviour.