Introduction

The Virtual User Tree is a visual representation of a user behavior. Each tree node is called an Action.

Actions can be configured, moved, added or removed. When the Virtual User is executed, each action is processed from the top to the bottom.

Action types

When imported, a Virtual User is static. E.g. if you recorded a login page with the email john.doe@mycompany.com and replay a thousand Virtual Users, each one will use the same credentials. This is not a good practice and would give you inexact analysis results. To make a realistic and dynamic Virtual User you must variabilize it. OctoPerf offers many tools to do it very quickly:

  • Predefined variables such as constants and CSV data sources,
  • HTTP response extractors to extract a variable from a response and inject it in the next request,
  • Correlation rules to automatically extract and inject relevant parameters.

Once created variables can be injected in actions using the ${...} syntax. E.g. to inject the variable myVar you can write ${myVar}.

There are 4 types of actions:

  • Logic Actions like containers, conditions or loops,
  • HTTP Request Actions that are used to send HTTP request to your server,
  • WebDriver Actions to simulate real-browser interactions using Selenium,
  • Post Processors to extract variables or assert responses.

HTTP Actions

The HTTP Request Actions lets you send an HTTP/HTTPS request to a web server. There are height types of HTTP request actions.

Post Processors

Post Processors Actions are divided into two families:

  • Extraction: grab something from a server response to reuse it in a subsequent request,
  • Verification: check that a server response matches a given criteria.

The post processors available are:

Why Post processors are essential

Most web applications are sending and receiving dynamic parameters which change each time a user logs in, or makes an action on the application.

Variable Extractors are specially designed to address such dynamic behaviors. Behind this technical vocabulary hides a very simple concept: extract something from a server response, inject it in subsequent requests requiring it.

Once you acquired the logic, you can simulate almost any user on any app.

Logic Actions

Logic Actions, like conditions, loops and delays, are used to create dynamic Virtual Users.

The logic actions available are:

Select Actions

To select a Virtual User tree node (an action), simply click on it. A blue border appears on the selection: HTTP Request Action

You can use the following keyboard shortcuts to interact with the selection:

Shortcut Button Description
del Removes the selected action.
Expand the selected action.
Collapse the selected action.
Selects the previous action.
Selects the next action.
ctrl + ↑ Moves the selected action up.
ctrl + ↓ Moves the selected action down.
ctrl + → Indent the selected action.
ctrl + ← Dedent the selected action.

The buttons are visible when you place your mouse hover an action, on its top right corner.

Info

The 'shift + ?' shortcut shows / hides a list of available shortcuts.

Add Actions

To add an action to the Virtual User tree:

  1. Place your mouse hover an action category (Logic Actions, HTTP Actions or Post Processors) on the left menu,
  2. A popup menu appears,
  3. Press the left mouse button on the chosen action,
  4. Move your move in the Virtual User tree,
  5. A drop zone is displayed,
  6. Release the mouse button.

The action is now inserted in the tree.

You can also simply click on the grey '+' button of each action. This way it is inserted at the end of the tree or after the selected action in the tree (if any).

Info

To place an action under another one (to make it a child action), move your mouse over the parent before dropping it.

Hovering your mouse over a collapsed node name will expand it. A collapsed node can be identified by the first icon on its left:

  • the node is collapsed, its children are hidden,
  • the node is expanded, its children are visible.

Note

There is a notion of hierarchy:

  • All Logic Actions except the Delay can contain children. So you cannot put any action under the Delay Action.
  • All HTTP Request Actions can only contain Processors, and Processors can only be placed under a HTTP Request Action.

Remove Actions

To remove an action you can either:

  • Click on the icon visible on the right upper corner of any tree node,
  • Select it and hit the Del key.

Info

Like other node buttons, the remove button is only visible when you place your mouse hover a tree node.

Trash

Once an action is removed, it is placed in the trash. The trash is visible on the left panel, under the action categories. The trash label displays how many actions it contains. The trash size is limited.

You can move a removed action from the trash to the Virtual User tree like you would add any new action.

Restore Actions

A message is displayed on the right upper corner of the screen for a short period of time when you remove an action:

Restore Action

Click on this message to restore the action to its initial position in the Virtual User tree.

Copy/Paste Actions

To duplicate an action:

  1. Place your mouse pointer over the action tree node,
  2. Node buttons appear on the upper right corner,
  3. Click on the Copy button.
  4. Place your mouse pointer an other action tree node,
  5. Click on the Paste button.

Info

You can copy paste actions across virtual users of the same project.

You can use keyboard shortcuts to copy (CTRL + C) and paste (CTRL + V) actions.

Configuration

Configuration Tools are available on the left panel. These tools are useful to parameterize Virtual Users.

They are shared by all the Virtual Users of a project. So you can share server configurations and predefined variables across your Virtual Users. Correlation rules are also shared across a project, but they must be applied separately on each VU.

Configuration Tools

Servers

The Servers configuration tools lets you add, update and remove servers. If you create a Virtual User from scratch in a new project, you should create a server before adding any HTTP Request Action.

Variables

The Variables configuration tools lets you add, update and remove variables. Such variables lets you configure, for example, a login credentials list to be used by each VU.

Correlation Rules

The Correlation Rules tools lets you update and remove correlation rules. To add a Correlation Rule you may first create a Regexp Action.

Service Level Agreement

The SLA Profiles tools lets you update and remove SLA profiles. After having created an SLA Profile you can create an SLA Action.

Files

The Files manager lets you upload resources files.

Resources are used:

  • In CSV variables,
  • In POST requests actions,
  • For JMeter plugins,
  • To override hosts files,
  • etc.

Tools

VU Tools

Export VU

The Export VU menu is also available on the left panel. Use it to :

  • Download the current Virtual User as a JMeter JMX file,
  • Download a Zip archive that contains all file resources of the project.