AI auto correlation

This pre-GA (Generally Available) feature is accessible only to a select set of customers. The full GA of this feature will soon be made available.

The BlazeMeter AI auto correlation provides automatic correlation for JMeter tests.

BlazeMeter's AI-assisted features require explicit consent from the account owner before team members can use them. By default, AI features are disabled. For more information, see AI Consent.

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.

Highlevel overview

  1. Record the HAR file.

  2. Attach the HAR file to the BlazeMeter performance test.

  3. Review the auto-correlation.

  4. Correlate missing values.

  5. Validate by doing dry runs.

  6. Export as JMX file.

  7. 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 thr web application under test. The benefits of using standard HAR files are that no proxy setup or recorder configuration is needed.

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.

Analyse the HAR file

  1. Open BlazeMeter and open your Performance test.
  2. Upload the HAR file to the test.
  3. Wait for BlazeMeter to analyze the file.
    The Analysis tab appears in the test configuration.

What is this HAR file about?

The analysis window can help you understand the recorded scenario of each HAR file.

  1. Open your Performance test configuration.

  2. Go to the Analysis tab of the test to open HAR file editor.

  3. Select a HAR file.

  4. 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.

  5. 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

Go through any failed steps and do manual correlation using extractors and injections.

  1. Open your Performance test configuration.

  2. Go to the Analysis tab of the test to open HAR file editor.
    It shows the results of the analysis of each HAR file.

  3. 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.

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.

  1. Identify the missing value in the a responses and request.

  2. Drag the mouse pointer to select the found value in a response.
  3. Click Create extractor.
    The extractor is added to the Correlation tools list.
  4. Drag the mouse pointer to select the missing value in a subsequent request.

  5. Click Inject extractor.

  6. Find the extractor in the Correlation tools list and click Inject.

The extracted value is injected.

Finalize

  1. Click Dry run and validate the correlation.
  2. Click Finalize.
    BlazeMeter generates the JMX script.
  3. Run the test.