What new in JMeter 5.0?

A new Apache JMeter™ version 5.0 was released this week! Since the last release in February 2018, this new version has many major and impactful changes to both improving user experience and bug fixes. 

Some of the important updates include HTTP request changes, improvements for the search and the results tree, new capabilities for flow action control, and an easier way to find a ThreadGroup name with new function __threadGroupName.  

Here are the most important things you need to know about the JMeter 5.0 version:

1.HTTP Request Changes

In previous versions, the HTTP reset only took place in SSL state. However, this was incorrect behavior as SSL connections use certificates only when the connection is created. With JMeter 5.0, when using default HC4 Implementation, JMeter will reset the HTTP state (SSL State + Connections) on each thread group iteration. As a result, you may observe higher response times in your test, compared to previous versions of JMeter. This is because TCP connections will be re-established more frequently, which involves more round-trips over the network. If you don’t want this behaviour, simply set httpclient.reset_state_on_thread_group_iteration=false 

You can now allow parameters entered in Parameters Tab to be used in the body instead of being ignored. This is useful when testing web-services that support more than 2 kinds of requests (GET, POST, PUT, PATCH, DELETE, etc.) (Bug 62248Bug 43612 were fixed thanks to Artem Fedorov from BlazeMeter to the open source community)

Version 5.0 now supports sending files as multipart/form-data requests for PUT and DELETE, in addition to the previous version that supported only POST request types.It is now also possible to send a JSON Body with an attached file allowing web-services to use the JSON format for communicating with application servers more easily. 

In previous versions, if you sent a multipart/form-data request, you could not set Content-Type and it had the default value ‘text/plain’:

With JMeter 5.0, you are able to set the Content-Type for multipart/form-data requests. For example you can set application/json:

2. UI Improvements

JMeter has made improvements to its most popular listener: View Results Tree. It is now possible to look at headers without the html page code in response, in a seperate tab. This makes it easier to navigate looking look at a large number of requests and responses at one time.

The Test Action was renamed to ‘Flow Control Action’, and the following new capabilities were added:

·       Start Next Thread Loop

·       Go to the next iteration of Current Loop

·       Break Current Loop

Improvements have also been made to the search functionality, with the addition of these new navigation and replacement buttons: Next/Previous, Replace/Replace All/, and Replace & Find:

3. New Functions in JMeter 5.0 

It’s now easier to find a ThreadGroup name. A new function __threadGroupName has been introduced to obtain a ThreadGroup name. This function is also available in the JMeter Function Helper Dialog. Before this version, users had to use the following function to get a ThreadGroup name: ${__BeanShell(ctx.getThreadGroup().getName())}.

In addition, bugs were fixed, functions were added and more elements were improved. Read the full list of changes, here.