I have been using JMeter for more than ten years, and I am still learning JMeter. I have written Groovy script on most of the projects which I have worked on and created custom functions. In this blog post, we are going to see about my first JMeter Plugin called Validate Thread Group.
I always wanted to develop productivity utilities to enhance JMeter experience. But I never focused on developing plugins and tweaking the user interface in the past. Mainly due to the complexity of understanding the whole ecosystem of JMeter core and dependencies. No concrete resources are available which motivate performance engineers to develop the plugins.
<1% of developers are contributing and making their code available in form of plugins or open sourcing their code in public repositories. JMeter Plugins repository contains only the plugins only if the developer is interested in publishing them. There are many utilities, libraries are available if you search in public repositories which are not published either in JMeter core or JMeter plugins.
This needs to change. More resources should be available focusing on developing plugins, contributing to JMeter core, understanding the JMeter GUI and its ecosystem. I am planning to publish blog articles, video tutorials about extending JMeter in the future. Please stay tuned.
Table of Contents
My First JMeter Plugin – Validate Thread Group
This blog post will not discuss anything about the plugin implementation. We will see the mechanics in another post.
Validate is one of the core features of JMeter. It helps to validate the test plan by running the selected Thread Group with no timers, 1 iteration, 1 thread, and zero Startup delay.
All you need is to right-click on the thread group and click
What-If you have been involved in debugging for quite some time. Every time right-clicking on the thread group and validating will cause frustration.
To solve this frustration, you can configure the Thread Group as shown below and press
Ctrl + R to run and validate.
Often, the above values are parameterized which you do not want to change it before pushing it to the repo. To validate the test plan frequently to debug, the only way is to right-click.
Validate Thread Group solves the right-click frustration by adding a button to the toolbar as shown below.
How to install it?
There are a couple of ways to install it in your JMeter ecosystem. Head to my GitHub repo to build it yourself using Maven.
Or you can simply download the jar file from the releases and place it in
JMETER_HOME\lib\ext and restart JMeter.
The easy method would be using JMeter Plugins Manager. Launch Plugins Manager > Available Plugins. Search for
validate thread group as shown below.
Validate Thread Group and hit Apply Changes and Restart JMeter.
Once JMeter launches, you can see the new button on the toolbar.
By default, Validate button executes all the thread groups in the test plan with 1 iteration, 1 thread, no timers and zero start up delay.
If you would like to change the validation properties, go to
jmeter.properties to configure or place the below properties in the
user.properties (recommended approach).
# Number of threads to use to validate a Thread Group
# Ignore BackendListener when validating the thread group of plan
# Ignore timers when validating the thread group of plan
# Number of iterations to use to validate a Thread Group
# Force throughput controllers that work in percentage mode to be a 100%
# Disabled by default
Non-Hidden Secret :)
The Validate feature is also available on the Run menu. Believe me, you do not want to take this route.
I am trying to add a shortcut
Ctrl+Alt+V to this feature, which is a huge productivity booster. If you find any issues, please log in to repo.
Contributions are welcome.