Runtime Properties¶
The Runtime Properties menu from the left panel lets you update JMeter Properties while the test is running:
These properties are initially defined in the JMeter tab of the User Profiles.
Saving Runtime Properties¶
The following procedure explains how to update JMeter Runtime Properties:
- Select a User Profile in the left table,
- Update the properties in the center panel,
- Click on the Save button.
Applying Runtime Properties to all User Profiles¶
The following procedure explains how to update Apply JMeter Runtime Properties to all User Profiles of the currently executed Scenario:
- Select a User Profile in the left table,
- Click on the Apply All button.
Manage different test environments¶
A common use of properties is to manage the test environment URL from the runtime screen.
This allows for more flexibility since this way you can test different environments using the same Virtual users. When you want to test a new environment you just need to create or edit a runtime profile:
And to use this property in the virtual user we will create a constant variable. Inside it we use the property function configured this way ${__property(url,,petstore.octoperf.com)}
:
With this syntax, we read from the url
property if it exists, otherwise we use petstore.octoperf.com
as a default value. This allows you to have a Virtual user that you can properly validate since the validation doesn't allow setting runtime properties. And at the same time you benefit from runtime properties during real tests if they exist.
The final step is to use the url
constant variable, and the easiest way is in the servers menu, so that all requests using this server will take input from the property:
Controlling hit rate¶
Combining a runtime property with the hit rate config allows you to edit the hit rate while the test is running.
First you need to use a config like this one on every runtime profile ${__P(hit)}
:
Then on the same runtime profile create a runtime property with the same name hit
:
Then editing this property while the test is running will allow you to change the hit rate:
This can be particularly convenient to pause the execution temporarily and resume it later.