Introducing JMeter 5.4: New Features and Abilities
On the 4th of December 2020, the Apache JMeter™ team released a brand new version of Apache JMeter 5.4. This article provides information about this new version, on top of the official JMeter changelog and the 5.4 announcement. Let’s take a look at which new features are available in the latest release of this popular open source load testing tool.
An Easier Way to Filter Out Embedded Resources
As you are probably aware, when performance testing web applications, JMeter should behave as close to the real browser as possible. This includes handling of the so called “embedded resources”: images, scripts, styles, sounds, fonts, etc.
Prior to JMeter 5.4, it was possible to exclude these external resources from the “embedded resources” scope. However, you had to come up with a “negative” regular expression, which wasn’t very convenient. Now, JMeter 5.4 provides a separate input field where you can specify the “unwanted” domains:
GraphQL HTTP Request
Prior to JMeter 5.4 it was possible to test GraphQL using the normal HTTP Request sampler, however:
- It was required to define a JSON object with the “query” attribute. The value had to be properly escaped for the translation of GraphQL queries into vanilla JSON. This created a lot of overhead, and now the solution is simple.
- It was required to add the HTTP Header Manager to send the Content-Type header.
Here’s a small demo showing what the GraphQL HTTP Request sampler does under the hood, making your life easier:
So basically you can use the same syntax as in your GraphQL console or other tools/programming languages, without worrying about the translation.
New implementation of the Backend Listener: InfluxDBRawBackendListenerClient
This listener allows storage of “raw”, i.e. non-aggregated, metrics. Now you have individual results for each sampler. These include start time, connect time, elapsed time, status, sampler (or transaction) name, and latency.
Let’s execute the GraphQL HTTP Request from above with the Backend Listener enabled and see what is stored in the InfluxDB:
As you can see:
- The first "show measurements" command returns an empty result
- After the execution of the GraphQL HTTP Request sampler there is a "jmeter" measurement
- The "select * from jmeter" command shows the aforementioned metrics and they match the ones from the View Results Tree listener ("ttfb" is “time to first byte” and JMeter’s equivalent is “Latency”).
Upgrade to JMeter 5.4
Even if the new features are not something you will be using right away, you should still consider upgrading. Apart from the new functionalities, JMeter 5.4 includes bug fixes and performance improvements. This is due to its own codebase optimization as a side-effect of ramping up the versions of its dependent libraries. Using the latest version of JMeter is recommended both by JMeter Best Practices and BlazeMeter’s 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article.