Skip to content

Set Runtime Property Action

To understand the purpose of the property action, first we need to talk about properties and their differences with variables.

Variables already do the heavy lifting by providing a lot of options, but variables are local to each Virtual user.

Properties on the other hand are saved on the load generator machine and shared with all other Virtual users running from this machine. You can use the runtime properties screen to edit them at runtime, which is a good way to change your virtual users behavior while the test is running.

The only issue with this is that since OctoPerf will distribute your load automatically, it might be hard to predict how many different load generators will be created and even harder to pass values from one to the other.

That is exactly why we created the Property action:

Link action

To add the property, simply pass the name/value of the property to be added.

This action will create or edit the specified property on our API and propagate it to all the users running. It is an effective way of sending a token to all groups of users to login with or any similar mechanism.

Using a property value

The syntax to use a property anywhere in your script is as follows: ${__property(sessionToken)}.

You can use additional settings, for instance ${__property(sessionToken,,defaultvalue)} this way if sessionToken doesn't exist, defaultvalue will be used. Combined with conditions you can make sure to avoid any inconsistencies.