In this video, I talk about how to install the JMeter Plugin Manager as well as other plugins, what the best JMeter plugins are, and why you need them. JMeter is an open-source load testing tool that is already robust, but there are some fantastic plugins that have been developed for it that you might want to use in your next load test.
Hi everyone, Nicole here, back again for another Ask a Flooder, and I hope everybody is staying alert, not anxious, during these crazy times. In today's Ask a Flooder, our customer asks: "What are the best JMeter plugins?"
What is a JMeter plugin?
So first, I want to talk about what a JMeter plugin is and how you can actually install one. Apache JMeter is a really great, robust load testing that is one of my personal favorites. There are still some things that could be done better or could be extended, and the great thing about being an open-source tool is that anybody, pretty much, can just jump in and develop these plugins for JMeter to extend functionality, so that it supports more protocols or to customize load profiles in a way that is easier. We already have a blog post on this, and I will leave a link to that article as well in the description because it goes into a lot more detail. However, I still want to give you my personal top 3 JMeter plugins.
How do you install a JMeter plugin?
You can install a plugin for JMeter in two ways.
One is to download it from JMeter Plugins, which I will give you a link to, and then you paste that into either the lib — it's usually in the lib folder, but it could be in the ext (extensions) folder. Each plugin is going to differ as to what you need to copy into what folder, but that's why I prefer the second method, which is the Plugin Manager.
The Plugin Manager is a plugin itself, so you will initially need to do that copy and pasting of the jar file. Once you have the JMeter Plugin Manager installed, downloading and installing a plugin is as simple as choosing which ones you want and then clicking install. JMeter restarts, and that's pretty much it. So I do recommend that the Plugin Manager be the first plugin that you install. But that's still not my top 3 favorite - that's just an optional step.
What are the top 3 JMeter plugins?
Custom Thread Groups
Now for the actual plugins. My #1 favorite is the Custom Thread Groups. See, with JMeter, you get the standard default thread group, and all that does is it asks you how many users you want to run, how many loops, the duration, and the ramp-up. That's it. So that's good for a lot of uses, but it doesn't really help you in cases where maybe you want to plan a spike test, and you want to make sure that all the users have fully ramped up and gotten to a certain point, and then all hit the server at once. Or maybe you want to do a step load. Previously I've discussed stress testing and how a step load can be useful for that. In that case, the Thread Group doesn't quite cut it because it only ramps up a user, and then it continues at the same level of load for the duration of the test.
So, if you want any sort of variation in the middle (increasing users or decreasing), then you're going to want something else.The Custom Thread Groups plugin has a lot of different types of thread groups. My favorite is the Ultimate One because you can probably do almost anything on that one. It also has the Stepping, Concurrency, Arrivals, and Free-Form Arrivals, so you have quite a few options.
Throughput Shaping Timer
Plugin #2 is the Throughput Shaping Timer. I love it because not a lot of load testing tools, even the proprietary ones, actually have this. This is really handy when you have a project where you're given a requirement that isn't in terms of the number of users; it's in terms of hits per second, or requests per second, or something to do with the actual throughput of the test.
The problem with that is that the throughput tends to change, so you can't actually take as a given that it'll remain constant for the duration of the test. Things like response time or latency are going to affect that throughput. For instance, when you have one user or one thread that's running, and it sends a request and receives the response back in one second, you can't necessarily say that that's going to be the same when there are a thousand threads doing the same thing. The server's under more load, so maybe it'll take five seconds instead of one second— but that's already changed your throughput. Before, one thread was doing one request per second, and now it's doing one request every five seconds.
So it can get a little complicated, and the Throughput Shaping Timer is one of my favorites because it promises to solve all that. The Throughput Shaping Timer dynamically changes the think time, so at the beginning of a test, for instance, when there are no response time issues and requests are being returned really quickly, it might increase the think time so that it slows down your load test. So you're not going over that throughput that you wanted to maintain. And then later on in the test, when all the users are ramped up, then it'll decrease the think time that it uses. So it's great because you just have this consistent throughput throughout your test. It's a really intelligent way to test.
I do want to say, though, that you do also want to play around with this a bit and make sure you understand how this works. One page could have several requests in it, and you'll want to take that into consideration when you're choosing what to set in that timer.
HTTP/2 Request Sampler
My #3 is the HTTP/2 Sampler. If you don't know what HTTP/2 is, it's an upgraded or next-generation protocol to the normal HTTP that we already use. The HTTP/2 protocol is supposed to be faster and more efficient, so more and more web apps are switching to it because of that.
The problem is that JMeter's HTTP request sampler is only really for HTTP sites, so the HTTP/2 sampler is an upgraded version of the HTTP sampler. It's really easy to use. The experience is pretty much going to be the same for you, but in the background, it uses the faster HTTP/2 protocol rather than the slower one.
My colleague, Jason Rizio, actually wrote a whole blog post about this, so if you want to learn more, I will put a link in the description.
I hope that answered your question, and until next time, happy flooding!