Extract values using AI auto correlation
The BlazeMeter AI auto correlation provides automatic correlation for JMeter tests.
AI auto correlation is available on Unleashed plans. Free accounts do not display the Auto Correlation tab and cannot start analysis.
Why is correlation important?
Correlation means extracting values from a previous response and passing them as arguments to the next request. Correlation is not the same as parameterization, where hard-coded values are replaced by test data, because test data is from a different source.
Correlation is important in Performance testing because without it, generally, tests won't run at all or not as intended. After recording a Performance test in Apache JMeter, the recorded test is not immediately able to maintain the same session. Certain dynamic values change every time you make a request: the session ID, CSRF tokens, time stamps, and so on. Before the automated test can run, you must identify these dynamic values in the HTTP requests and responses, and replace them with variables. This manual process is called correlation.
You as a Tester typically use regular expressions or other extractors to extract values from responses; you store extracted values in variables and insert those variables in subsequent requests. This complex manual task takes up a lot of test creation time.
BlazeMeter assists you with AI-powered automatic correlation tools. The auto correlation tool uses HAR recordings as input. Extractors derive values from HTTP responses, and injectors use those values in HTTP requests.
High-level overview
-
Record the HAR file.
-
Open the Auto Correlation tab in your Performance test.
-
Upload the HAR file.
-
Choose the location for analysis and dry runs.
-
Start the correlation.
-
Review the auto-correlation.
-
Correlate missing values.
-
Validate the results with a dry run.
-
Export as JMX file.
-
Run the test.
What are extractors?
An extractor is a rule how to obtain a value from an HTTP response and put it in a variable.
When testing a web app that uses dynamic tokens, values in subsequent requests can depend on the response of the previous request. To perform the auto correlation, BlazeMeter parses HAR files and capture patterns to recognize these dynamic values (extraction). The goal of using extractors is to replace specific values with reusable variables (injection) to make your script robust. BlazeMeter automatically generates extraction rules for you.
What are injectors?
Injectors are rules that define where a variable will be used. Injectors are responsible for inserting the extracted variables into subsequent requests. BlazeMeter automatically generates injection rules for you.
Obtain HAR files
BlazeMeter AI auto correlation relies on HAR files as input. HAR files are standard HTTP Archives that you use to record browser network traffic while loading a page of the web application under test.
The benefits of using standard HAR files are that no proxy setup or recorder configuration is needed. All modern browsers can export HAR files from the Developer Tools > Network tab.
The maximum HAR file size is 100 MB. HAR files exported from Fiddler in HAR 1.2 format are also supported.
You have two options:
-
When you save a HAR file from the browser, by default, it sanitizes confidential data, such as usernames and passwords, which can cause issues for correlation. To disable the sanitization in the Firefox or Chrome Developer Tools, go to Settings > Preferences and enable the "Allow to generate HAR with sensitive data" option.
-
The best source of HAR files is Playwright, which can record traffic and produce clean HAR files that are easy for our correlation analysis tool to process. To learn more about how to generate a HAR files, see the Playwright documentation.
HAR recordings must follow these rules or the correlation analysis will be inaccurate or incomplete:
-
Use a private or incognito window to avoid preexisting cookies and cached session data.
-
Start the recording from a clean state: no pre-existing login, cookies, or cache.
-
Record from the same network path where the execution will run.
For example, do not record inside a VPN and then run it outside the VPN. -
Record the HAR file end-to-end.
For example, don't start mid-session with a pre-authenticated state. -
Two-factor authentication, SSO flows, or additional security checks (such as Google location verification) are not supported.
Analyze the HAR file
The Auto Correlation tab guides you through AI consent, HAR upload, and analysis. On supported plans, the tab is visible even before AI consent is granted. The analysis form is part of the tab.
- Open your Performance test in BlazeMeter.
- Select the Auto Correlation tab.
- Follow the tab's guidance to obtain account-owner AI consent when consent has not been granted.
- Upload the HAR file.
- By default, BlazeMeter uses a public location. To test internal URLs, enable Use private location and select a location.
- Select Start correlation.
- Wait for the analysis to complete.
The selected location appears above the dashboard and is used for both the initial analysis and dry runs.
What is this HAR file about?
The Auto Correlation tab can help you understand the recorded scenario of each HAR file.
-
Open your Performance test configuration.
-
Select the Auto Correlation tab of the test to open the HAR file editor.
-
Select a HAR file.
-
Go to the Scenario Description tab to see an AI-generated high-level summary of the interaction recorded in the HAR file in natural language. It describes steps, additional observations (such as server status codes), and sums up detected successes and failures.
-
Go to the Log tab to see an overview, benchmark metrics (such as test run time or total/executed/failed requests), and the log output with success and error messages.
Review the correlation
Review the correlations and use extractors and injections to correlate missing values. During the first analysis, BlazeMeter groups requests and assigns short, action-based group names, such as "Login" or "Add to cart". BlazeMeter also generates names for each request.
-
Open your Performance test configuration.
-
Select the Auto Correlation tab of the test to open the HAR file editor.
It shows the results of the analysis of each HAR file. -
Select a HAR file and review the correlations:
-
View the correlation health.
-
Select requests in the left-most column and view the request/response pairs in the Response column.
-
BlazeMeter highlights extracted values that are injected in subsequent requests.
-
To edit a generated request name, hover the pointer over the name and select the Pencil button. Select the Edit button and then use the checkboxes to add and remove requests from groups.
After a dry run, use Request details to inspect both passing and failed requests, as described in Validate the correlation.
Filter requests by type
You can filter requests by file type in the Correlation Dashboard.
-
Open the Correlation Dashboard for a HAR file.
-
Under Filter by, select Type.
-
Select the request types to display:
- Audio
- Data
- Font
- iFrame
- Manifest
- Script
- Style
- Worker
-
Review the filtered requests and correlation results.
To include only the filtered requests in the generated JMX file:
-
Select Finalize (generate JMX).
-
Select Only include filtered requests.
-
Select Generate.
The generated JMX file contains only the request types selected in the filter.
Correlate missing values
If the correlation health is below 100%, it means that BlazeMeter could not auto-correlate some values. Use the Correlation tools column to correlate the missing values manually.
-
Identify the missing value in the a responses and request.
- Drag the mouse pointer to select the found value in a response.
- Select Create extractor.
The extractor is added to the Correlation tools list. -
Drag the mouse pointer to select the missing value in a subsequent request.
-
Select Inject extractor.
-
Find the extractor in the Correlation tools list and select Inject.
The extracted value is injected.
After applying an injection, you can apply it to other requests that share the same pattern. BlazeMeter finds matching requests, applies the injection, and shows which requests were updated. One injection can cover every matching request.
Validate the correlation
An HTTP 200 response does not prove that correlation is correct. Check the actual response content and the values injected during the dry run.
-
Select Dry Run to validate the results.
-
Select Request details for a request. This button is available for all requests, including passing requests. The modal title uses the format Request detail: <request name>.
-
In the modal window, compare the request and response from the test run with the request and response from the HAR recording in these four sections:
- Request from test run:
- Response from test run:
- Request from HAR:
- Response from HAR:
Headers and body are displayed separately. Only data from the latest dry run is displayed. For failed requests, inspect the error messages in these sections.
-
For requests with injections, inspect the highlighted runtime values in the request from the test run. Each injection shows the recorded value beside the runtime value and is flagged when the value was never extracted. The injected-value tooltip uses the format
Value injected in runtime - ${extractor_name}. -
Inspect the response content for failed requests and for passing requests with amber warnings. These warnings identify responses that resemble a login page or error payload, have a different content type, or are much smaller than the recorded response.
-
Correct missing or incorrect correlations and repeat the dry run.
Amber warnings do not change request pass/fail status or the correlation health score.
To export a request as cURL, select the icon with the Export cURL tooltip.
Finalize
- Complete the correlation validation.
- Select Finalize (generate JMX).
- Enter a file name. The field is prefilled with
test-script. - Select Generate.
BlazeMeter generates the JMX script. - Run the test.
A numeric suffix is added when the file name already exists in the test configuration.
In the generated JMX file, groups become Transaction Controllers containing their requests. Request names use the format ID Method - Name, for example 12 POST - Login to eshop. Request numbering matches the UI.