e-testing Blog

What’s New in Apache JMeter 3.0?

By Swapna Komatineni

JMeter is a highly capable tool that we are utilising with a range of different clients. The latest version 3.0 was recently released with substantial upgrades and added functionality. In this article we explain the new features, as-well-as some of the benefits of using JMeter.

Let’s start with a basic introduction of JMeter for the benefit of those not fully familiar with the technology…

Apache JMeter is a pure Java, open-source application, first developed by Stefano Mazzocchi of the Apache Software Foundation. It is designed to load test functional behaviour and measure the performance of web applications in addition to other services and protocols.

Some of JMeter’s key features are:

  • Open source Licensing
  • Easy Installation Process
  • Friendly GUI
  • Platform Independent
  • Full Multi-Threading Framework
  • Unlimited testing capabilities
  • Easy Visualisation of Test Results
  • Multi-Protocol Support

As software testing specialists, invariably we must understand the unique requirements of each customer before providing solutions at a manageable cost. JMeter is increasingly useful in this respect, however it is widely accepted that building scripts and executing tests in JMeter is more difficult than using off the shelf tools such as HP’s LoadRunner, which has wizard based scripting for example. Certainly, there is a steeper learning curve, but ultimately a more rewarding objective, as JMeter provides a significantly flexible platform, which can easily be used in either on premise or via cloud based injection models.

JMeter incorporates the elements in the diagram below, as well as extended plugins which will help with planning, executing and reporting on performance testing.

JMeter Elements

New Features

Test Plan Creation and Debugging Improvements

  • Search Feature: This is implemented in the ‘View Results’ tree to allow searching for text / regexp in Request/Responses/Headers/Cookies. This will make correlation and test plan creation easier

JMeter Search Feature

  • JSON Post Processor: JMeter 3.0 brings the solution for JSON handling into core functionality, introducing the JSONPath Post Processor component. This post processor is very similar to the Regular Expression Post Processor but is well suited for JSON code
  • Validation feature: This is used to run a selection of Thread Groups with 1 user, no pause and 1 iteration in one click for debugging the script

JMeter Validation_featureSimplified HTTP Request UI
A new “Advanced” tab has been added to the HTTP Request UI, to simplify configuration. The file upload feature has been moved into a dedicated tab which increases the space for parameters within UI, which make the look and feel of the interface simpler and easier to use.

JMeter Simplified HTTP Request UI

Reporting Improvements
Traditionally, reporting has been a limitation in previous versions of JMeter. Fortunately, this has now been addressed, with the addition of a user friendly reporting engine, including graphing capabilities to make this crucial post execution task easier. JMeter 3.0 comes with a new “Reporting Dashboard” which allows the user to generate dynamic reports in HTML: APDEX, Graphs and a Test Summary Report.

A dynamic HTML report can now be generated either at the end of a load test or from a result file as needed, providing a significant improvement over previous versions.
This dashboard provides the following metrics:

  • APDEX (Application Performance Index) table that computes the APDEX score, based on configurable values for tolerated and satisfied thresholds, as well as graphs from result files.
  • Backend Listener now allows the definition of sampler lists as regular expressions, as shown below

JMeter_backend_listener

The graphs now available from the Reporting Dashboard include:

  • A request summary graph showing the success and failed transaction percentage
  • A single statistics table providing a summary of all metrics per transaction, including 3 configurable percentiles
  • An error table providing a summary of all errors and their proportion to total requests
  • Zoomable chart where you can check/uncheck every transaction to show/hide it for
  • Responses / Bytes / Latencies Over Time
  • Hits / Transactions / Response Codes per second
  • Response Time vs Request per second
  • Latency vs Request per second
  • Response times percentiles
  • Active Threads Over Time
  • Times vs Threads
  • Response Time Distribution

Examples of the available reports are shown here:

JMeter transactions per second JMeter time vs threads

Protocols and Load Testing improvements
HTTPClient library – the migration to HTTPClient 4.5.2 improves the following fields of JMeter:

  • HC4CookieHandler in HTTP Cookie Manager component and select standard Cookie policy
  • Server Name Indication (SNI) support
  • Improved and better performing validation mechanism for Stale connections and Keep-Alive management
  • Better support for compressed responses.

Introduction of Sample Timeout feature
This new Sample Timeout Pre-Processor allows you to apply a Timeout on the elements that are in its scope.

JDBC request now uses DBCP2 pool
JDBC Request and JDBC Connection Configurations have been updated to replace old Excalibur Pool by Apache Commons DBCP2 pool. As a consequence, properties have been migrated to equivalent, when available and when UI has been updated. Note that unlike Excalibur, Commons DBCP uses the validation query when creating the pool. So make sure the query is valid. The default query suits many databases, but not all – for example Oracle requires ‘SELECT 1 FROM DUAL’ or similar.

JMeter_jdbc_connection_configuration

UX and UI Improvements:

  • Better display in screens and icons
  • Improved Thread Group UI and related actions (Start, Start No Timers, Validate)

See the difference from the previous version (new-left, old-right)

JMeter menu change

New Shortcuts
New shortcuts have been introduced, allowing faster scripting for JMeter users. These will enable you to quickly add elements into the test plan.

For example:

  • Ctrl+0 – Adds Thread Group
  • Ctrl+1 – Adds HTTP Request
  • Ctrl+2 – Adds Regular expression extractor …. …
  • Ctrl+9 – View Results Tree

Along with above major changes, below are some other items that we have identified with this new version:

  • JSR223 Test Elements no longer require a Cache Compilation Key
    Just check the Cache compiled script if available checkbox and the elements (Pre-Processor, Post-Processor, Assertions, Listeners, …) this will pre-compile the script and cache the compiled code if the underlying language supports it.
  • Jexl3 has been integrated. It provides new scripting features and much better documentation. JEXL is a language very similar to JSTL.

We hope this article was useful to help understand the updated to the new version of JMeter 3.0. Should you require any assistance with learning JMeter or how to implement it on your software testing projects, get in touch with us.

CLICK HERE FOR UPDATES

Subscribe to our RSS feed and get the latest updates in your inbox weekly

logo