In this article we are going to see how we can add jmeter properties & configurations in maven plugin. This is continuation post of my previous article.

Properties in jmeter

  • : these are jmeter internal component properties
  • : These are properties for listner which aggregrates multiple JTL files
  • : HTML report generator properties
  • : JMX file save, read service properties
  • : Jmeter system properties
  • : Jmeter upgrade properties
  • : User customizable properties
  • : Properties used in client-server testing.

Properties to work on

We can change any property file and this will affect in jmeter startup. But, it is safe to change any property key/value in file . will override other properties.

So, if you need to change any properties from, put in file.

To change : Best Practice

This is recommended way to inject custom property in jmeter. Infant, if you want ot change any jmeter internal property , use this way. User property will always override system property. So, if you have any changed values, do it here.

I also prefer to parametrize Load Test properties.

Example Source

In my example i am using these properties.


A smarter approach is to parametrize even these property with maven property. So that when we need , we can change these values when we execute.

Example Source

In here you can see I have following maven properties , which is adding values inside jmeter plugins user properties

  • Maven Properties
  • And properties are injected inside maven plugins

so, what advantage I am getting? In this way, we can actually change property values with maven commands.

For example, let’s say, we want to change our thread.number from 20 to 50, target.rpm 30 to 40. So, with maven command I will change property

mvn -Dthread.number=50 -Dtarget.rpm=40 clean verify

In this way , we can reuse same test case for different load configurations, different environments etc.

To change Property folder

  • By default all properties are pointed to /src/test/jmeter, the test case directory.
  • To change the directory

To change configuration directory

  • by default the configuration directory is /src/test/conf. When we want to change , we can use <confFilesDirectory>path_to_cofig_files</confFilesDirectory>

What are the config files? usually jmeter internal configurations, like log4j2.xml. Or, if you are using any custom JAR which may have any configuration files.

Use Custom Property file

  • To use own property file , we can inject with customPropertiesFiles. I am adding in project

Example Source

In this example, I have testing with ./src/test/conf/stage/ This is similar like a development environment where

  • developers can test locally
  • developers can test dedicate dev server
  • tester can test in qa server
  • CI/CD can test in staging server. (i am using this)

in the property file I have following in

and I am including this property in plugins


So, you can see the POM.XML, which is clean and small.

And, when we run the test , we can see this. I am using jvisualVM to validate only 5 threads are created to test the app.


To Replace Properties

Usually custom properties are merged with existing properties. If we want wa can replace.


To change

This are spatial properties, used to send instructions to remote slave PC in jmeter master-slave execution.

For example, if we want to run each slave node with 20 threads & 15s ramp-up


To change : I wont recommend

This way we can change jmeter properties, for example, to change log level of Jmeter’s own logging system


To change : recommend for custom sampler

saveservice is mainly used for jmeter internal JMX serialization work. It is used to define how XStream (de-)serializes classnames.

Use this only when you have your own developed sampler included in JMX.


To change : recommend for updated components

  • If you have done any update or include any other component in Jmeter, you can use this to include. This also apply having company specif classes used in test project.

To change

if you want to include any system property , you can use this. For example, you want to provide folder path which used in test script, you can use this.


Thanks :)