In this article we are going to see how we can perform distributed testing using maven jmeter plugin. This is continuation post of this original article.

To know basic about Jmeter distributed testing, you may visit this or my blog.

Remote Testing at a glance


So, we need two projects one for controller , one for worker. We will run worker project to all worker hosts, but controller will trigger test using RMI.

As we know , we need to setup RMI, there are some manual steps before original test execution.

RMI setup

  • We need to create SSL keys to use in both controller & worker for RMI. JDK comes with keytool which we need to use.
keytool -genkey -keyalg RSA -alias rmi -keystore rmi_keystore.jks -storepass changeit -validity 7 -keysize 2048 %*

In jmeter bin directory, you can see a script create-rmi-keystore.bat containing the same command. We can use this in commandline which will create rmi_keystore.jks

I am using following info with my password to create jks file. You should your own password & info.


For , jmeter GUI, We have to keep this in jmeter bin directory. So in this case, we will keep in /src/test/conf

Add info to

After adding jks file, we need to specify associated property so that jmeter can work properly. So, we need following properties based on info when I have created jks.

# Type of keystore : JKS
# Keystore file that contains private key
# Password of Keystore
# Key alias : this is very important to be matched with command alies in keytool
# Type of truststore : JKS
# Keystore file that contains certificate
# Password of Trust store
# Set this if you don't want to use SSL for RMI

This should be in both worker & controller

Now, you may avoid using and directly put in <propertiesUser> section (i prefer)

Add worker info to controller

Now we need worker IP addresses in controller


We can also do this by plugin configuration to keep it changeable during maven command. Use <serverList> to add comma separated multiple server addresses.


To keep simple, I am commenting this from project & keep this info in

Please final controller project pom from controller project.

Jmeter Remote Controller Project

  • This has JMX
  • This has JKS files
  • This has user properties

Add RMI info to worker property

  • NO JMX as it will injected by server
  • Keep created JKS file rmi_keystore.jks at /sec/test/conf folder
  • Use like controller like this



I am keeping in /src/test/jmeter folder.

  • We need to have two executions in jmeter plugins, just enough to install & run as remote server.

I am adding additional runInBackground property false, this is optional.

  • We need to Add worker’s IP info . I am injecting via maven property <hostname></hostname> into configuration. And keeping default server port 1099

So, please see worker project for final pom.

Jmeter Remote Worker Project

  • This will have JKS files
  • This will have user properties

Executing Remote tests

  • Step 1 : Run Jmeter worker project mvn clean verify

  • Step 2 : Run Jmeter controller project mvn clean verify

In worker :


In Controller :


  • Step 3 : Ger report from controller.

Notes :

  • SSL is disable to avoid manual process. As it is intranet setup, so, security issues can be ignored.
  • All are done with Oracle JDK8, so key standard is JKS. If you are using latest openjdk, you might need to use P12 format. You may use my keystore command.
keytool -genkeypair -alias pkcs12 -keyalg EC -dname "cn=CN, ou=OU, o=O, c=C" -validity 365 -keystore shantonu_key_store.pfx -keypass 123456 -storepass 123456 -v

in this case you need to change user properties based on command like alias is pkcs12, format is pkcs12, file name is shantonu_key_store.pfx

  • If you have existing JKS file, you can convert to P12.
  • JKS to P12 : keytool -importkeystore -srckeystore keystore.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore keystore.p12

  • P12 to JKS : keytool -importkeystore -srckeystore keystore.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore keystore.jks
  • For security, my repository wont have JKS keys of my PC
  • For simplicity, I am using password 123456
  • detail RMI setup