Run massively scalable performance tests on web, mobile, and APIs

Request a Demo
Jun. 21st, 2018

How to Create a Local Repository of JMeter Plugins

Apache JMeter™ is a very powerful tool for load testing. One of the things that makes it so powerful, is its plugins. JMeter plugins enable constantly adding multiple functions and capabilities that aren’t available in core JMeter, thus improving the tool. Because JMeter is such a popular tool with a large open-source community, many plugins are created for it.

 

The best place to find the most popular JMeter plugins is on the JMeter plugins website, which also provides a plugin manager for JMeter, or from this blog post. So, you can easily search for the plugin you want in the plugin manager and install it straight from the manager. This eliminates the need to manually download JAR files and place them in the lib/ext/ folder, as this is done automatically through the manager. Click here to learn to install the JMeter plugins manager.

 

So why would anyone need to create a local repository of JMeter plugins? Some organizations have very strict network restrictions. In these places, trying to install a JMeter plugin using the public plugin manager won’t work, as the network will block any JAR file that is downloaded from outside of the organization’s internal network.

 

Luckily, if you need to, it is pretty simple to create a local repository of JMeter plugins and configure the plugin manager to download the plugins JAR files from a local path. Let’s learn how.

 

Step 1: Choose the plugins

 

Create a list of all the JMeter Plugins you want to add. This is the list I created, you can use it as a reference:

 

Step 2: Download the plugins files

 

Download all the necessary JAR files, screenshot PNG files and helpUrl html files from jmeter-plugins.org and place them in a folder. This should be done on a computer outside the internal network.

 

jmeter plugins local repository

 

Make sure you also download the plugins manager jar file. We will need it for later.

 

Move the files to your internal network. Now you have the local repository on your computer!

 

Step 3: Create a JSON file

 

Use the content from here. Each plugin starts with “{id”.

 

For example:

 

  {
    "id": "bzm-random-csv",
    "name": "Random CSV Data Set",
    "description": "Config item that allows reading CSV files in random order",
    "screenshotUrl": "https://raw.githubusercontent.com/Blazemeter/jmeter-bzm-plugins/mas/random.png",
    "helpUrl":"https://github.com/Blazemeter/jmeter-bzm-plugins/blob/master/Random.md",
    "vendor": "BlazeMeter",
    "markerClass": "com.blazemeter.jmeter.RandomCSVDataSetConfig",
    "componentClasses": [
      "com.blazemeter.jmeter.RandomCSVDataSetConfig",
      "com.blazemeter.jmeter.RandomCSVDataSetConfigGui"
    ],
    "versions": {
      "0.1": {
        "downloadUrl": "https://github.com/Blazemeter/jmeter-bzm-plugins/releases/csv-data-set-0.1.jar",
        "libs": {
          "jmeter-plugins-cmn-jmeter": "https://search.maven.org/remotecontent?filepath=kg/apc/jmeter.jar"
        }
      }
    }
  }

 

You don’t need to create a JSON file for the plugins manager.

 

Step 4: Install a web server on your machine

 

I used Nginx:

 

For Mac

  • brew install nginx
  • sudo nginx
  • Place the plugins folder and the json file in /usr/local/Cellar/nginx/1.13.12/html/

 

jmeter plugins internal network

 

For Ubuntu

  • sudo apt-get update
  • sudo apt-get install nginx
  • Place the plugins folder and the json file in /usr/share/nginx/html/

 

Step 5: Find your internal IP address

 

Run the ifconfig command (ipconfig for windows) to find your internal IP address.

 

jmeter plugins, firewall

 

Step 6: Add URLs

 

Replace all the URLs from the JSON file with URLs to your local Nginx web server on http://<your_internal_ip>:8080/ (in my example http://10.129.66.91:8080/)

 

using jmeter plugins

 

Step 7: Install JMeter

 

Install JMeter from scratch, even if you had it on your computer before.

 

Step 8: Place the plugins manager JAR file in JMeter

 

Place the jmeter-plugins-manager JAR file in /lib/ext in your JMeter installation folder.

 

Step 9: Update your JMeter Properties file

 

Add the following line to the jmeter.properties file:

 

jpgc.repo.address=http://10.129.66.91:8080/my_plugins.json

  

Step 10: Start JMeter and install the Plugins!

 

Access the JMeter Plugins Repository from the Internal Network

 

The local JMeter plugins repository will be accessible to all computers in the same LAN in the internal network.

 

All you need to do it is follow steps 7-10, and you can run JMeter!

 

Running JMeter in BlazeMeter

 

After creating your JMeter script, you can run it locally or upload it to BlazeMeter. By running your script in BlazeMeter you will be able to massively scale your tests, collaborate on tests and reports, and analyze results instantly or over time with insightful reports.

 

To try out BlazeMeter, put your URL in the box below, and your test will start in minutes. Or, request a BlazeMeter demo.

     
arrow Please enter a valid URL

Interested in writing for our Blog? Send us a pitch!