Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Performance Testing with JMeter  3

You're reading from   Performance Testing with JMeter 3 Enhance the performance of your web application

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787285774
Length 166 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bayo Erinle Bayo Erinle
Author Profile Icon Bayo Erinle
Bayo Erinle
Arrow right icon
View More author details
Toc

Configuring JMeter

Should you need to customize JMeter default values, you can do so by editing the jmeter.properties file in the JMETER_HOME/bin folder, or making a copy of that file, renaming it as something different (for example, my-jmeter.properties), and specifying that as a command-line option when starting JMeter.

Some options you can configure include the following:

  • xml.parser: This specifies Custom XML parser implementation. The default value is org.apache.xerces.parsers.SAXParser; it is not mandatory. If you found the provided SAX parser buggy for some of your use cases, it provides you with the option to override it with another implementation. For example, you can use javax.xml.parsers.SAXParser, provided that the right JARs exist on your instance of JMeter classpath.
  • remote_hosts: This is a comma-delimited list of remote JMeter hosts (or host:port if required). When running JMeter in a distributed environment, list the machines where you have JMeter remote servers running. This will allow you to control those servers from this machine's GUI. This applies only to distributed testing and is not mandatory. More on this will be discussed in Chapter 6, Distributed Testing.
  • not_in_menu: This is a list of components you do not want to see in JMeter's menus. Since JMeter has quite a number of components, you may wish to restrict it to show only components you are interested in or those you use regularly. You may list their class name or their class label (the string that appears in JMeter's UI) here, and they will no longer appear in the menus. The defaults are fine, and in our experience, we have never had to customize them, but we list it here so that you are aware of its existence; it's not mandatory.
  • user.properties: This specifies the name of the file containing additional JMeter properties. These are added after the initial property file, but before the -q and -J options are processed. This is not mandatory. User properties can be used to provide additional classpath configurations, such as plugin paths via the search_paths attribute, and utility JAR paths via the user_classpath attribute. In addition, these properties files can be used to fine-tune JMeter components' log verbosity.
  • search_paths: This specifies a list of paths (separated by ;) that JMeter will search for JMeter add-on classes; for example, additional samplers. This is in addition to any of the JARs found in the lib/ext folder. This is not mandatory. This comes in handy, for example, when extending JMeter with additional plugins that you don't intend to install in the JMETER_HOME/lib/ext folder. You can use this to specify an alternate location on the machine to pick up the plugins. Refer to Chapter 4, Managing Sessions.
  • user.classpath: In addition to JARs in the lib folder, use this attribute to provide additional paths that JMeter will search for utility classes. It is not mandatory.
  • system.properties: This specifies the name of the file containing additional system properties for JMeter to use. These are added before the -S and -D options are processed. This is not mandatory; it typically provides you with the ability to fine-tune various SSL settings, key stores, and certificates.
  • ssl.provider: This specifies the custom SSL implementation if you don't want to use the built-in Java implementation; it is not mandatory. If, for some reason, the default built-in Java implementation of SSL, which is quite robust, doesn't meet your particular usage scenario, this allows you to provide a custom one.
    In our experience, the default has always been sufficient.

The command-line options are processed in the following order:

  • -p profile: This specifies the custom jmeter properties file to be used. If present, it is loaded and processed. This is optional.
  • jmeter.properties file: This is the default configuration file for JMeter and is already populated with sensible default values. It is loaded and processed after any user-provided custom properties files.
  • -j logfile: This is optional; it specifies the jmeter logfile. It is loaded and processed after the jmeter.properties file that we discussed earlier.
  • Logging is initialized.
  • user.properties: It is loaded (if any).
  • system.properties: It is loaded (if any).

All other command-line options are processed.

You have been reading a chapter from
Performance Testing with JMeter 3 - Third Edition
Published in: Jul 2017
Publisher: Packt
ISBN-13: 9781787285774
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime