Blog

JMeter Correlation Recorder 2.5: An Approach to the New Plugin Version

Learn how the latest version of the JMeter Correlation Recorder plugin can make correlating dynamic values easier and minimize errors in performance testing.

JMeter Correlation Recorder 2.5: An Approach to the New Plugin Version Screenshot

Facing the ever-evolving challenges of performance testing with JMeter, teams are constantly on the lookout for solutions, especially when it comes to the intricate task of correlating dynamic values in automated flows. 

This critical process, demanding a keen eye for detail and a significant investment of time, is pivotal for achieving accurate testing outcomes. The stakes are high, as any oversight in replacements or missed parameterizations can lead to failures, particularly in extensive flows.

Hence, the Correlation Recorder or Automatic Correlation Recorder (ACR), as it’s commonly known, comes into play. 

With its latest update to version 2.5, this JMeter plugin introduces an array of features aimed at simplifying the correlation process through diverse methods.

In this article, we aim to shed light on the plugin’s benefits and its transformative impact on daily operations. For a deeper dive into its functionalities, we recommend exploring the User Guide and Installation Guide available through BlazeMeter Labs.

Explore our tailored Performance Testing Services!

Correlation Recorder 2.5 Features

Correlation Recorder 2.5 Features Screenshot

Firstly, when starting to use the tool, the Correlation Recorder provides a template for recording and correlating in any mode. We highly recommend its use, as it contains all the necessary elements for a simple and successful development.

Template View of the Correlation Recorder Loaded in JMeter
Template View of the Correlation Recorder Loaded in JMeter

This template automatically applies general filters to ignore extra traffic from recordings, saving time. You can use these filters as they are or customize them for your recording. You can also add new ones.

Currently, the Correlation Recorder offers three main modes for dynamic value linking:

  1. Through legacy.
  2. By automatically comparing and detecting variables.
  3. Using existing templates.

Exploring each method allows us to assess its viability in presented scenarios, choosing the most suitable alternative for each situation.

Click here to keep learning with our guide on Continuous Performance Testing!

Dynamic Value Linking 

1.Through Legacy

Representative Image

Legacy Correlation involves setting a custom rule set based on flow knowledge and identifying dynamic values needing correlation.

This mode closely resembles the manual correlation that JMeter flow automators use. It involves identifying both extraction and replacement regular expressions and re-recording to verify the process is accurate.

Next, we share a table with some real examples of extraction and replacement regular expressions:

Regular Expression for ExtractionRegular Expression for Replacement
1_wpnonce=([a-zA-Z0-9]*)’_wpnonce=([a-zA-Z0-9]*)
2name=”execution” value=”(.*?)”execution=([^&]+)

In the latest version of the plugin, the process of extraction and replacement in .JSON format is made easier, allowing for more efficient correlation of values in structured data.

While this was possible before by using regular expressions for that purpose, now the use of JSON-path extractors simplifies the capture of specific information straightforwardly.

Upon closer examination of correlation through legacy, it requires the creation of replacement regular expressions that may sometimes be the same, similar, or different from the extraction ones. This entails an initial time investment to set up a set of rules, in scenarios where they may not be reusable.

For instance, scenarios like the following could illustrate this point, among others:

  • An application frequently alters its structure or how dynamic values are created.
  • Dynamic values are unique to a specific test scenario.
  • Configured rules are highly personalized and specific to a particular case.
View of the rules configuration and Legacy mode enabled before making a second recording to correlate a sample flow Screenshot
View of the rules configuration and Legacy mode enabled before making a second recording to correlate a sample flow

In such scenarios, if we were to manually automate the workflow, we would likely need to record with JMeter more than once to thoroughly explore the details and nuances of the process. This approach can lead to the introduction of errors that often cause many inconveniences (especially in extensive workflows).

From our experience, even in situations where manual automation of the workflow might seem faster at first glance, it can be beneficial to explore the plugin and correlation through legacy. This is because it reduces the likelihood of making mistakes and can help us address some complex scenarios.

Moreover, its ability to correlate flows, where requests rarely fail but might when reproduced for multiple users, makes this option even more appealing.

Initially, dynamic value linking through legacy was the only mode the plugin operated in. But then it evolved, incorporating two others in order to reduce time and effort.

Now, we’ll outline new ways to proceed, which need a single recording to work. They uniquely offer correlation suggestions if requests fail.

2. Automatically Comparing and Detecting Variables

To correlate using automatic comparison and variable detection, it’s necessary to reproduce the initially recorded flow, identify failing requests, and present suggestions to make them work.

Next, we share a screenshot with the generated suggestions ready to apply in an example flow:

generated suggestions screenshot

After applying the suggestions, correlation happens automatically. The test plan can then be checked to confirm the necessary values are extracted and replaced, making the flow run without errors.

3. Using Existing Templates

Using existing templates for correlation means applying predefined rule sets to fix failing requests with relevant suggestions.

Templates can be saved locally, shared by the community, or provided by BlazeMeter. BlazeMeter’s templates follow best practices, and you can structure others similarly by following the plugin’s instructions.

We share a screenshot of the available templates for correlating an example flow:

templates for correlating an example flow screenshot

At first, BlazeMeter provided some templates for certain application types, encouraging the community to add their own and expand the choices.

These templates load from the cloud, with their accessibility largely hinging on the type of platform subscription.

The application process is quite similar to the previous mode. Then, it’s just a matter of verifying proper functioning.

In automatic modes, it’s crucial to apply only the required suggestions for requests to work and not all that may appear. This way, we avoid adding unnecessary weight to the flow and excessive memory consumption.

To Sum Up

Illustrative image

The evolution of the Correlation Recorder to version 2.5 marks a significant advancement in automating workflows in JMeter, aiming for more efficient and less tedious performance testing.

Its ability to simplify and speed up dynamic values correlation while minimizing errors and reducing manual configuration time makes it a key plugin.

Through this article, we don’t seek to evangelize but rather to shed light on its potential. As a developing product, it has room for improvement, and with a growing user community, we anticipate valuable feedback for further enhancements.

For those interested in diving deeper, consider the BlazeMeter University course. It offers a comprehensive understanding and practical examples.

Need Support with Performance Testing?

With over 15 years of experience and a global presence, at Abstracta, we help startups to Fortune 500 companies significantly improve their performance levels.

Explore our solutions here and contact us to schedule a meeting and see how we can support your business growth.

Follow us on Linkedin & X to be part of our community!

Recommended Articles

Automation Pyramid Model for Performance Testing Process

How to Do Performance Testing for Web Applications?

How to Create Load Tests with JMeter DSL from Selenium Scripts in Performance Testing Services

444 / 445