Correlation Rule

Correlation Rule automates the time-consuming, error-prone and painful task of:

  • Creating variable extractions,
  • And replacing dynamic values with variables in requests.

A Correlation Rule is composed of a Regexp Post Processor and of Injection Rules.

It lets you apply the Regexp Extractor globally to a Virtual User and inject the generated variables into subsequent HTTP Request actions.

The Injection Rules are used to restrain where the variables are injected :

  • In query parameters,
  • In post bodies,
  • Etc.

When applied to a VU, the Correlation Rule generates one or more Regexp Post Processor.

These rules are common to a project, and can be created for the first VU imported. Then you can save time by applying them to all other VUs imported in the same project.

Correlation Rules List

To open the correlation rules page, simply click on the Configuration > Correlation Rules button in the Virtual User page.

The left part of the page lists all the correlation rules for the current project. Rules declared in this list are common to all the VUs of a project, and you can apply them to any of its VUs. You can use the headers of this list to filter or sort it.

The right part displays the selected Correlation Rule configuration. It is only editable if a rule is selected.

Warning

Recorded Requests/Responses are mandatory to apply correlation rules. To use them you must import a fiddler of firefox HAR file.

Import a Correlation Rules Framework

The following procedure explains how to import Correlation Rules from a Framework:

  1. Click on the Frameworks button in the bottom right corner of the Correlation Rules panel,
  2. Select the framework to import,
  3. New correlation rules are created and available in the left table.

OctoPerf SaaS currently supports these frameworks:

  • SAML
  • DOT NET
  • JAVA

Add Correlation Rule

The following procedure explains how to add a Correlation Rule from an existing extractor:

  1. Insert a Regexp Post Processor into your Virtual User,
  2. Configure the extractor,
  3. Click on the Convert to correlation rule button in the top right corner,
  4. The Correlation rules page opens, and the newly created rules is selected.

Update Correlation Rule

The following procedure explains how to edit a Correlation Rule:

  1. Select the rule to update,
  2. Set the correlation rule name on the right,
  3. Configure the extraction part, it is like the advanced mode of a Regexp Post Processor,
  4. Configure the injection part (see below),
  5. Close the rules panel by clicking on the Close button positioned at the top right corner.

Injection Rules

For each correlation rule, a table lets you configure where to inject the extracted values:

Column name Description
Replace Part of value to replace only what is matched by the extraction rule or Whole value to replace the whole content
In Where to replace: in POST bodies, query parameters, HTTP Headers, etc
with name The name of the POST Parameter, Query Parameters or Header whose value to replace (On available if the In selected is POST parameter values, query parameter values or header values)

To remove an Injection Rule click on the delete button at the right of the table.

To add an Injection Rule click on the plus button at the bottom of the table.

Remove Correlation Rule

The following procedure explains how to remove a Correlation Rule:

  1. Click on the rule to remove in the correlation rules list,
  2. Click on the Delete button, at the bottom of the panel.

Info

You can use SHIFT + click or CTRL + click to select multiple variables and delete them all at once.

Warning

If a rule is deleted, it will not be available anymore for any VU of the current project. It does not affect the currently variabilized Virtual Users.

Apply Correlation Rules

To apply Correlation Rules to the current VU, simply click on the Apply All button.

All correlation rules are applied at once on the Virtual User.

Warning

The modifications made to the VU cannot be reversed. So either apply them to a copy of your VU or try them on a fresh import that can be re-done.