Skip to content

JMeter

Apache JMeter is old

"JMeter is old technology", I hear this a lot.

"Let’s use this tool or that tool instead of JMeter as it’s the latest", I hear this a lot.

"We need a lightweight tool without the GUI interface to write our tests as that will make us more agile", I hear this a lot.

It’s all nonsense it really is, there seems to always be a call for using the most modern technology for all forms of testing whether its Performance Testing or Automated Functional Testing and the result of this is that the people writing the tests spend to long learning the new tools and not enough time building something that will ensure the software being developed is the best it can be.

I am conscious that the above statement is a bit or a generalisation and there are some exceptions but for many organisations this is true.

The aim of all these tools is the same thing, to support your QA journey through to the delivery of a robust, well performing piece of software, the tools you use to accomplish this are not important if you have a robust modular framework in place, and you have a sensible approach to data management and reporting.

We are going to look at in this post the reason why JMeter is so good at what it does and why just because it is considered old technology by some still makes it the right choice for many testing professionals.

JMeter Plugins Overview And Install

JMeter in its vanilla form is a very powerful tool for performance testing, the ability to create complicated test scenarios using the out-of-the box samplers, timers and logic controller can sometimes be extremely difficult and require you to write your own complimentary code.

There are however Plugin’s that exist that can help in building some of the more challenging scenarios.

In this post we are going to look at some of these and discuss how they can be used.

Installing Plugins

The correct way to install plugins when running locally is to use the Plugins manager by selecting Options -> Plugins Manager from the JMeter menu or selecting the Plugins Manager icon.

plugins manager icon

Statistical Analysis in Performance Testing

What does statistical analysis have to do with performance testing you may ask, more than you would think is the answer.

Due to the large volumes of result data that is generated and analysed you are performing statistical analysis of your data when presenting your results. - 90th Line, - 95th Line, - 99th Line, - Average, - Median.

Are all examples of values in the JMeter Aggregate Report.

  • Average,
  • Std.Dev.

Are examples of values in the JMeter Summary Report as well as the Graph Results.

We are going to take a look at these statistical techniques so you can understand, if you don’t already know, how they are calculated as well as how they can be of benefit when analysing performance test results.

We will also look at other statistical techniques that you can use outside of JMeter by using the .jtl file output, we will use Microsoft Excel for our analysis but other spreadsheet type tools are equally as good.

As way of a disclaimer there are many ways of analysis data, far too many to go into in this Blog Post but hopefully reading this will encourage you to explore this subject further as it can be fascinating.

For each way of analysing the results we will look at its definition, look at an example and discuss how it can be of use when presenting results.

Let’s get started.

Modularisation in JMeter

The key to all good automation is modularisation which is effectively isolating small chunks of your application under test into separate tests and then re-using these smaller chunks in your larger, more complicated tests. Example of good candidates for modularisation are logon and logoff as well as any other high-volume journeys through your application such as search functionality.

The rationale for this approach is that if these high volume common functional activities change you only need to make the update in a single test rather than in multiple tests. If your business functionality is only used once in a single script rather than many scripts it makes no sense to modularise it but if it is used twice, or more, then it should be considered.

Sample JMX files for this tutorial are available for download:

Load Profiles in Performance Testing

When we think of performance testing we normally think of thousands of requests with thousands of users generating huge volumes on our application under test or increasing the load until the application under test fails or runs out of resources.

This is not a good approach when determining load for your performance tests for several reasons and can in some cases render your performance testing meaningless.

This post will outline some of the pitfalls that are commonly made when it comes to generating load and will look at ways to suggest improvements to your approach to load profiles.