KitKarson
KitKarson

Reputation: 5637

Add JMeter plugin programmatically - non gui mode

I am trying to use jmeter-plugins. Does it have to be placed only under /lib/ext folder? Is there any way for me to refer to the plugin jar using some properties? (like user.classpath property to refer to my custom lib)

Upvotes: 3

Views: 5335

Answers (3)

Linden X. Quan
Linden X. Quan

Reputation: 802

  1. Download cmdrunner in lib folder

    cd apache-jmeter-5.4/lib
    curl -O https://repo1.maven.org/maven2/kg/apc/cmdrunner/2.2.1/cmdrunner-2.2.1.jar
    

    download-cmd

  2. Download jmeter plugin Manager in lib/ext folder

    cd ext/
    curl -O https://repo1.maven.org/maven2/kg/apc/jmeter-plugins-manager/1.6/jmeter-plugins-manager-1.6.jar
    
  3. Install plugins

    cd ..
    java  -jar cmdrunner-2.2.1.jar --tool org.jmeterplugins.repository.PluginManagerCMD install jpgc-webdriver
    

Upvotes: 0

abbas
abbas

Reputation: 7099

After placing the plugin manager jar in the /lib/ext/ you need to do the following to install a particular plugin.

Download the latest cmdrunner from this URL by changing the version.

wget http://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/2.2/cmdrunner-2.2.jar

Copy the cmdrunner to jmeter/lib/ directory

mv cmdrunner-2.2.jar apache-jmeter-5.1.1/lib/

Execute the following command to generate script file PluginsManagerCMD

java -cp apache-jmeter-5.1.1/lib/ext/jmeter-plugins-manager-1.3.jar org.jmeterplugins.repository.PluginManagerCMDInstaller

After the script is generated, you can use it to install a particular plugin

apache-jmeter-5.1.1/bin/PluginsManagerCMD.sh status
apache-jmeter-5.1.1/bin/PluginsManagerCMD.sh available
apache-jmeter-5.1.1/bin/PluginsManagerCMD.sh install jpgc-tst=2.5

Upvotes: 0

RaGe
RaGe

Reputation: 23785

If you don't want to put JMeter plugin jars in the lib/ext directory, then define the property search_paths in jmeter.properties.

Upvotes: 1

Related Questions