Creating Your Own JMeter Plugin Manager: A Comprehensive Guide

Mohamed Ibrahim
4 min readSep 7, 2023

--

Image courtesy: Frugal Testing

Introduction:

This guide provides detailed instructions on setting up a customized JMeter plugin manager within your organization. It addresses the challenge of managing JMeter plugins in environments with limited internet access and simplifies the process through easy configuration

The Challenge: Limited Internet Access

Imagine a scenario where specific hosts within your organization lack reliable internet access. This seemingly simple issue can quickly become a major roadblock when it comes to keeping your JMeter plugins up to date. Without internet access, JMeter struggles to update or install plugins, creating a hurdle for your performance testing efforts. Additionally, managing custom plugins across various hosts can turn into a time-consuming task, often requiring manual intervention for library uploads.

The Solution: JMeter Local Plugins Manager

JMeter Local Plugins Manager, your savior in this challenging landscape. This solution is designed to overcome the hurdles posed by limited internet access and complex custom plugin management. It offers a robust yet straightforward approach to managing and updating JMeter plugins within your organization.

This solution is written using spark java framework — which is a simple lightweight micro framework for creating simple web apps.

Features

  1. Downloads public plugins from internet and it’s libraries to local storage.
  2. Records the uploaded/downloaded plugin information to SQLite DB.
  3. Provides easy upload of custom plugins which are used within the organization via UI.
  4. Creates and exposes a modified API to retrieve plugin info for JMeter Plugin Manager.
  5. Easily configurable scheduler to periodically check for the newly available plugins/versions in the market.

List of exposed APIs

List of Exposed APIs — Host, port and URI-Path are configurable

Note: Port and URI-path(v1) are configurable — it totally depends on the configuration file which is being passed while running the app

How to setup the Plugin Manager

  • Download the latest release version from github
  • Create configuration.properties file as below
server.port=2222
server.uri.path=/v1

# Scheduler interval (in ms) to check for new plugins
scheduler.interval=86400000

# DB Connection Pool configuration
db.min.threads=2
db.max.threads=10
db.timeout.secs=300

# External APIs
jmeter.plugins.url=https://jmeter-plugins.org/repo/
mvn.repo.url=https://repo1.maven.org/maven2/org/apache/jmeter/

# Directory Configs
local.repo.path=/app/plugins-manager/

# Uncomment the below if you are running this on Windows
#local.repo.path=C:\\Temp\\plugins-manager\\
  • Run the JAR java -jar jmeter-local-plugins-manager-<version>.jar -c configuration.properties
  • Verify the application (JMeter local plugin manager is up and running) by checking the status API(http://<hostname>:2222/v1/status) on browser
  • In your jmeter.properties set the jpgc.repo.address (this should be the local plugins manager API).
    As per the above configuration properties file it will be jpgc.repo.address=http://<hostname>:2222/v1/plugins
  • For more information on configuring custom URL to plugins manager — have a quick read on the guide

Managing Custom Plugins

It is easy to manage the custom plugin using this tool — All you need is to hit the below URL in browser.
http://<hostname>:2222/v1/upload

Fill the details — All fields are required
Id field is used to retrieve a plugin and you can have different versions under one plugin id.

You need to select the plugin jar on plugin field and its libraries on dependency field. Once done, click on upload.

It will be uploaded to the configured directory and a record entry will be created in SQLite DB.

Behind the scene(Directory Structure):

local.repo.path=/app/plugins-manager/

The local.repo.path is the directory path where all the information gets stored by the plugins manager. It will create 3 directories and a DB file

  • custom — stores the custom plugins
  • plugins — store the public plugins
  • libs — dependencies for the plugins will be stored here

All the respective mappings will be recorded in the DB File, which is predominantly used for querying and maintaining the local plugins manager up to date.

Conclusion:

I believe, This will assist people in setting up their own JMeter plugins manager, aiding those struggling with managing custom and restricted public plugins in organization.

I’ve contributed to the Jmeter-local-plugins-manager in the open-source community. If you appreciate my work, please hit a star to the Github Repo, and consider creating an issue or pull request for improvements.

I’ll be publishing more unique articles, so please support by following and subscribing for notifications on new articles.

Stay positive, Happy engineering !

Sign up to discover human stories that deepen your understanding of the world.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Mohamed Ibrahim
Mohamed Ibrahim

No responses yet

Write a response