In the previous post, I already show you what is the JMeter plugins and how to install JMeter plugins via GUI mode (please note that it only apply to JMeter 3.x or higher). And continue to that post, today I will show you how to do it by command line. It would be greate if you want to use Plugins Manager in an automated fashion.
1. Preparations
- Download plugins-manager.jar. Go to this page to check out the latest version.
- Copy file plugins-manager.jar and put it into /${JMETER_HOME}/lib/ext
- Make sure is
cmdrunner-2.0.jar
present in ${JMETER_HOME}/lib directory. If not, take it from here.
- Make sure is
PluginsManagerCMD.sh
orPluginsManagerCMD.bat
is present in jmeter/lib directory. If not, run this command in the terminal/command line from jmeter directory:java -cp ./lib/ext/jmeter-plugins-manager-0.11.jar org.jmeterplugins.repository.PluginManagerCMDInstaller
to have the files created
Note: in the command above ./lib/ext/jmeter-plugins-manager-0.11.jar
. This is the latest version of plugins file when I write this post, please change it corresponding to the latest version at your time.
2. Using Plugins Manager in the command line
Now, you can use PluginsManagerCMD
to get the status of plugins, install or uninstall them. The command-line is simple:
PluginsManagerCMD []
Where command
is one of “status“, “install“, “uninstall“.
params
is a string with plugin IDs, comma-separated, like this: jpgc-cmd,jpgc-json,jpgc-casutg.
No spaces allowed currently. If you want to specify exact versions for plugins, do it like this: jpgc-json=2.2,jpgc-casutg=2.0
Example 1: get status
MAC:
./bin/PluginsManagerCMD.sh status
Click on the image to maximize
Windows: (Update later)
Example 2: install plugin
MAC:
./bin/PluginsManagerCMD.sh install jpgc-dummy,jpgc-json=2.2
Windows: (Update later)
Now you can open the JMeter and check the installed plugins
Example 3: uninstall plugin
MAC:
./bin/PluginsManagerCMD.sh uninstall jpgc-dummy,jpgc-json=2.2
Click on the image to maximize
Windows: (Update later)
3. Plugin IDs
In section 2, I mentioned that we need the Dummy Sampler plugin has id jpgc-dummy
or the JSON Path Extractor plugin has id jpgc-json
. I will show you how to get the id of plugin.
– Go to https://jmeter-plugins.org/ and you can see the ids of plugin
– But you can see all plugin IDs by that way, for another plugin, go to detail page of that plugin, and you can get the id here
Anyway, don’t worry about that, I will create a table with full information of plugin name and the corresponding ids
ControllersCritical Section ControllerCriticalSectionControllerGui
Hi,
When i try to run ./PluginsManagerCMD.sh status i get the following error. How to fix this issue? I am running this as root.
Error: Unable to access jarfile ./../lib/cmdrunner-2.2.jar
LikeLike
You have downloaded the cmdrunner-2.0.jar it seems.
download 2.2.jar and keep it in lib path. it worked for me.
download path:
http://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/2.2/cmdrunner-2.2.jar
LikeLike
How can I download custom plugin like below one using CLI on EC2 instance?
https://github.com/Blazemeter/jmeter-bzm-plugins/blob/master/parallel/Parallel.md
LikeLike
For now i have did it in GUI first and kept that file into linux via scp and it worked.
LikeLike
can the same process be done in EC2 linux instance
LikeLike