Skip to content

Link Action

Link action

The Link Action lets you share sections of your Virtual Users. You can make any Container into a Test Fragment. Fragments can then be reused through a Link action anywhere inside the project. This way you can reduce the maintenance time, for instance if you have 5 virtual users all doing a login, using a Link action you only have to maintain a single centralized Fragment.

It is important to differentiate:

  • Test Fragment: A former Container of one of your virtual users that has been transferred into a Test Fragment Virtual User. It cannot be executed by itself.
  • Link action: A pointer to a container inside a Test Fragment Virtual user.

Warning

It is recommended to avoid using Link actions inside Test Fragments; otherwise this may lead to cyclic dependencies that cannot be resolved.

Create Fragment

The easiest way to create a Test Fragment is to transform existing nodes of your virtual user, simply select if you want to place it in an existing Fragment VU or create one:

move-as-link

Warning

Only container nodes can be converted.

Create Fragment VU

The other option is to create a Fragment VU from the Virtual users page. After that you can copy/paste content in it from other virtual users or simply create it using the design page.

configure-link

Simply select the action to be replayed in this link. You can pick any container from any Fragment Virtual user. But it is only possible to select one at a time for a given link. If you need to select another one, please add another link action or merge the containers into another one inside the Fragment Virtual User.

Open Linked Action allows you to access this particular Action inside the Fragment Virtual user.

Info

Fragments can be used to merge statistics from several virtual user profiles into one. This way you can have only one entry for your login in the result table instead of one per virtual user.

Validation

When a virtual user is executed every link action will point to the corresponding action inside a Fragments virtual user:

link-validation

validate-link

When you execute a Validate Virtual User, the result of each link action is available from inside its fragment.

However, since a fragment can have several results from several validations, you must use the Open Linked Action button from inside the Link configuration screen to open the Fragment and display the result from this VU validation.


Cyclic dependency

cyclic-dependency

When using links within links, cyclic dependencies can happen, since they could lead to infinite loops, we detect them before the script is executed and they must be fixed.


cyclic-dependency-sanity

When you run a virtual user validation, the sanity check will detect these issues. Use the inspect button to be directed to the issue and fix it.

For example we can clearly see that this link is referencing himself, this behavior must be changed before proceeding with a test:

cyclic-dependency-example

Importing from JMeter

Link actions are automatically created upon importing a JMX that contains either a module controller or an include controller.