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 iscmdrunner-2.0.jar present in ${JMETER_HOME}/lib directory. If not, take it from here.
    plugins-cmd-cmdrunner.png
  • Make sure is PluginsManagerCMD.sh or PluginsManagerCMD.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
    plugins-cmd-plugins-manager.png

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

plugins-cmd-install-MAC.png

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

plugins-cmd-plugin-ids.png

– 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

plugins-cmd-plugin-ids-2.png

Anyway, don’t worry about that, I will create a table with full information of plugin name and the corresponding ids

 ControllersCritical Section ControllerCriticalSectionControllerGui

Types Plugin Name Plugin ID
Graphs PerfMon Metrics Collector jpgc-perfmon
Active Threads Over Time jpgc-graphs-basic
Response Times Over Time jpgc-graphs-basic
Transactions per Second jpgc-graphs-basic
Server Hits per Seconds jpgc-graphs-additional
Composite Timeline Graph jpgc-graphs-composite
Response Codes per Second jpgc-graphs-additional
Response Latencies Over Time jpgc-graphs-additional
Connect Times Over Time jpgc-graphs-additional
Bytes Throughput Over Time jpgc-graphs-additional
Extracted Data Over Time jpgc-pde
DbMon Sample Collector jpgc-dbmon
JMX Monitoring Collector jpgc-jmxmon
Response Times vs Threads jpgc-graphs-vs
Transaction Throughput vs Threads jpgc-graphs-vs
Response Times Distribution jpgc-graphs-dist
Response Times Percentiles jpgc-graphs-dist
 Thread Groups Stepping Thread Group jpgc-casutg
Ultimate Thread Group jpgc-casutg
Concurrency Thread Group jpgc-casutg
Arrivals Thread Group jpgc-casutg
Free-Form Arrivals Thread Group jpgc-casutg
 Timers Throughput Shaping Timer jpgc-tst
 Listeners Flexible File Writer jpgc-ffw
Non-GUI Console Status Logger jpgc-csl
Synthesis Report jpgc-synthesis
BM.Sense Uploader jpgc-sense-uploader
AutoStop jpgc-autostop
Graphs Generator jpgc-ggl
 Tools Command-Line Graph Plotting Tool jpgc-cmd
Inter-Thread Communication pgc-fifo
Tool to check Test Plan consistency jpgc-plancheck
Command-Line filtered results jpgc-filterresults
HTTP Simple Table Server jpgc-sts
Merge Results jpgc-mergeresults
JMS Sampler jpgc-jms
 Functions Custom JMeter Functions jpgc-functions
 Logic Controllers Weighted Switch Controller jpgc-wsc
Parameterized Controller jpgc-prmctl
 Samplers Dummy Sampler jpgc-dummy
UDP Sampler jpgc-udp
HTTP Raw Request jpgc-httpraw
OAuth Sampler jpgc-oauth
HDFS Operations IncludeControllerGui
Hadoop Job Tracker Sampler jpgc-hadoop
HBase CRUD Sampler jpgc-hadoop
HBase Scan Sampler jpgc-hadoop
HBase Rowkey Sampler jpgc-hadoop
WebDriver Sampler jpgc-webdriver
XMPP Sampler jpgc-xmpp
 Config Items HBase Connection Config jpgc-hadoop
Variables from CSV jpgc-csvars
Lock Files jpgc-lockfile
Redis Data Set jpgc-redis
Android Config N/A
Chrome Config jpgc-webdriver
Firefox Config jpgc-webdriver
HTMLUnit Config jpgc-webdriver
Remote WebDriver Config jpgc-webdriver
PhantomJS Config jpgc-webdriver
XMPP Connection Config jpgc-xmpp
 Pre-Processors Raw Data Source jpgc-httpraw
 Post-Processors XML Format PostProcessor jpgc-xml
JSON To XML Converter jpgc-json
JSON Path Extractor jpgc-json
JSON Formatter PostProcessor jpgc-json
 Assertions JSON Path Assertion jpgc-json

Advertisements