DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Code Security Remediation: What 50,000 Repositories Reveal About PR Scanning
  • Shrink a Bloated Git Repository and Optimize Pack Files
  • Jakarta Data in Jakarta EE 12 M2: From Repositories to a Unified Data Access Model
  • Using ChartMuseum as a Helm Repository

Trending

  • Building a Spring AI Assistant With MCP Servers: A Step-by-Step Tutorial
  • Identity in Action
  • Building AI-Powered Java Applications With Jakarta EE and LangChain4j
  • 5 AI Security Incidents That Broke Things in Production (and What They Have in Common)
  1. DZone
  2. Data Engineering
  3. Databases
  4. How to Create a Local Repository of JMeter Plugins

How to Create a Local Repository of JMeter Plugins

Learn how to create your own local repository of JMeter plugins to add functionalities to load testing in this tutorial.

By 
Guy Salton user avatar
Guy Salton
·
Jun. 25, 18 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
26.0K Views

Join the DZone community and get the full member experience.

Join For Free

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.

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:

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

  •  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.

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/)

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!

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!

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.

Repository (version control)

Published at DZone with permission of Guy Salton. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Code Security Remediation: What 50,000 Repositories Reveal About PR Scanning
  • Shrink a Bloated Git Repository and Optimize Pack Files
  • Jakarta Data in Jakarta EE 12 M2: From Repositories to a Unified Data Access Model
  • Using ChartMuseum as a Helm Repository

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook