The latest major JMeter release is JMeter 5.6
November 8, 2023

The Latest JMeter Update: JMeter 5.6

Performance Testing

We didn’t announce each and every patch and hotfix after JMeter 5.5 because, per se, the changes were not immense and worth a “real” blog post. Now, though, it’s time to highlight the most significant improvements and new features which were introduced in the latest JMeter update: JMeter 5.6. 

Always Use The Most Recent JMeter And Java Versions

It’s mentioned in JMeter Best Practices and in BlazeMeter’s very own 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure guide and the recommendation doesn’t expire: you need to upgrade to the most recent versions of JMeter and Java on next available opportunity. 

The reasons are:

  • You’re getting access to the new features of the products.
  • The annoying or blocking bugs are fixed.
  • Performance improved so you can conduct higher load from the same hardware or save money on the infrastructure.
  • Possibility to get hands-on experience with the new technologies.

BlazeMeter provides a choice between “Stable” and “Latest” versions via the JMeter Version dropdown:

JMeter version dropdown

With Taurus it’s possible to specify any other JMeter version if needed, for example for regression testing purposes including the desired set of plugins. 

JMeter 5.6: New Features

Although there are no new features which can be seen in the GUI, there are still some changes which can make your life easier

Define recorded samplers labels using templates

During the recording of HTTP Request samplers, it’s now possible to control their names using the following placeholders: #{name}, #{scheme}, #{host}, #{port}, #{path}, #{url} and #{counter}. They will be substituted with the respective values in the runtime.

Controlling HTTP request sampler names using placeholders.

Create a JMeter test plan from code

Prior to JMeter 5.6 it was possible to create a JMeter Test Plan programmatically either by using JMeter API or via JMeter DSL, the first approach assume a lot of boilerplate code and the second is nice but doesn’t support all JMeter features. 

Now it’s possible to create JMeter test plans using Java or Kotlin:

ListedHashTree root = new ListedHashTree();
TestPlan testPlan = new TestPlan();
ListedHashTree testPlanSubtree = root.add(testPlan);
ThreadGroup threadGroup = new ThreadGroup();
threadGroup.setName("Search Order Thread Group");
ListedHashTree threadGroupSubtree = testPlanSubtree.add(threadGroup);
DebugSampler debugSampler = new DebugSampler();
threadGroupSubtree.add(debugSampler);

SaveService.saveTree(root, Files.newOutputStream(new File("testplan.jmx").toPath()));

If you prefer Kotlin, you can even generate Kotlin DSL of your test plan directly from JMeter GUI:

Generate Kotlin DSL directly from JMeter GUI.

Here is example code for a test plan with 1 HTTP Request sampler:

org.apache.jmeter.testelement.TestPlan::class {

   props {

       it[name] = "Test Plan"

       it[guiClass] = "org.apache.jmeter.control.gui.TestPlanGui"

       it[userDefinedVariables] = org.apache.jmeter.config.Arguments().apply {

           props {

               it[name] = "User Defined Variables"

               it[guiClass] = "org.apache.jmeter.config.gui.ArgumentsPanel"

               it[testClass] = "org.apache.jmeter.config.Arguments"

           }

       }

   }

  org.apache.jmeter.threads.ThreadGroup::class {

       props {

           it[name] = "Thread Group"

           it[guiClass] = "org.apache.jmeter.threads.gui.ThreadGroupGui"

           it[mainController] = org.apache.jmeter.control.LoopController().apply {

               props {

                   it[name] = "Loop Controller"

                   it[guiClass] = "org.apache.jmeter.control.gui.LoopControlPanel"

                   it[testClass] = "org.apache.jmeter.control.LoopController"

                   it[loops] = "1"

                   it[continueForever] = false

               }

           }

           it[numThreads] = "1"

           it[rampTime] = "1"

       }

      org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy::class {

           props {

              it[arguments] = org.apache.jmeter.config.Arguments().apply {

                   props {

                       it[guiClass] = "org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel"

                       it[testClass] = "org.apache.jmeter.config.Arguments"

                   }

               }

               it[domain] = "blazedemo.com"

               it[method] = "GET"

               it[followRedirects] = true

               it[useKeepalive] = true

               it[name] = "HTTP Request"

               it[guiClass] = "org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui"

           }

       }

   }

}

Parameterize certain checkbox values with functions or variables

Previously, for certain actions such as enabling JMeter Thread Group’s schedule, it was required to edit the .jmx script beforehand somehow. Now, it is possible to use JMeter Functions or Variables as checkboxes values:

JMeter functions as checkbox values.

Other Improvements in JMeter 5.6

With the latest JMeter update, there were numerous bug fixes, performance fixes, build process stabilization, and beyond. However, the main benefits are:

  1. Users who have to deal with non-ASCII characters during test recording and replaying, now JMeter Proxy and Samplers use UTF-8 instead of default encoding which should make handling national characters easier.
  2. Users who simulate real browsers due to Improved support of embedded resources retrieving, now certain edge-cases like rel=preload are supported.
  3. Everyone because JMeter starts faster as JMeter components are now being discovered using ServiceLoader. You may notice some warnings regarding some plugins still using classpath scanning in the logs though, for the moment these messages can be safely ignored. 

As always changelog for the stable version can be found under https://jmeter.apache.org/changes.html  page and historical changes including initial version from 1990th is available at https://jmeter.apache.org/changes_history.html.

Bottom Line

As always, BlazeMeter is at the forefront of the performance testing industry and that trend continues with our same-day support for JMeter 5.6. You can get the most out of all your JMeter tests and everything the latest JMeter update has to offer by testing with BlazeMeter.

The best part? You can start testing now for FREE!

Start Testing Now