In this article we are going to see how we can configure Jmeter with plugins. This is continuation post of this original article.
What is Jmeter Plugin?
As jmeter is build with plugin architecture, community come forward with different types of plugins when required. And most of the plugins are open sourced. You can see jmeter plugins list from jmeter plugin site. All plugins are also available in maven central also.
Jmeter Plugins in maven
Now ware going to see plugin options in jmeter maven configuration. In maven central , you can see jmeter plugin set here. There are 61 plugins there.
I would suggest to keep jmeter small in size, that means , Only include plugins which we need in the test case.
In this example, we are going to see,how to include multiple plugins together as well as single plugin.
From this original article, you can know the basic POM structure. Let’s see the jmeter plugins part.
Among jmeter plugins, one of useful plugin is their thread groups. These thread groups were actually introduced to match up with Load Runner’s thread models.
In this test case, I am using ultimate thread group with our existing properties. It looks like this
Now, lets add this ultimate thread group plugin. From here, you can see latest version 2.9.
So adding directly like this under configuration.
<jmeterExtensions> <artifact>kg.apc:jmeter-plugins-casutg:2.9</artifact> </jmeterExtensions>
And that’s all.
Lets Run the test using
mvn clean verify
What Happened in Jmeter build
So, when we run the test, we can see jmeter build directory , there is a another jat added in ext folder.
This is actually the ultimate thread group containing jar.
That’s all. We have used single jmeter plugin.
Multiple Jmeter Plugin example
I have added 4 plugins here (most commonly used jmeter plugins)
<jmeterExtensions> <artifact>kg.apc:jmeter-plugins-standard:1.4.0</artifact> <artifact>kg.apc:jmeter-plugins-extras:1.4.0</artifact> <artifact>kg.apc:jmeter-plugins-graphs-basic:2.0</artifact> <artifact>kg.apc:jmeter-plugins-graphs-additional:2.0</artifact> </jmeterExtensions>
When we run, the jmeter has those JARs.
- if any plugin use outdated dependencies , use this