Run scripts locally
You can use LoadRunner Developer to execute your script locally from the command line, or from your IDE, with up to 50 concurrent Vusers. No license is required.
In this topic:
Execute DevWeb scripts
To run a DevWeb script from the command line, you can define an execution mode, single or load, with the relevant arguments. If the command does not include the execution mode, single mode is used by default.
Execution mode | Description |
---|---|
single | Runs one or more iterations for a single Vuser, regardless of the supplied scenario.yml file. |
load |
Runs the script, using the scenario settings defined in the script's scenario.yml file to schedule the Vusers. For more information, see scenario.yml. |
The following arguments can be used with either single or load mode:
Argument | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
rts |
The full file name of the runtime settings file to use to run the script. This overrides the rts.yml file in the script directory. For more information, see Customize runtime settings. |
|||||||||
keyLocation |
The location of a file containing an AES 256-bit key. Note: It is recommended to use your own key for keyLocation. If you do not have one available, you can generate a key with DevWebUtils. See To generate an AES 256-bit key. |
|||||||||
keyword | The value of the encryption key (as an alternative to providing keyLocation). | |||||||||
summary |
Defines the format for the replay summary. The possible modes are:
|
|||||||||
userArgs |
Defines an attribute that can be retrieved during the test run using load.config.user.args. For more information, see Add additional attributes. |
The following arguments can be used with single mode only:
Argument | Description |
---|---|
iterations |
The number of iterations that are executed for a single Vuser. Default: One iteration |
inspect |
Enables use of the web inspector to debug the script. |
pacing |
The waiting time (seconds) between two iterations. Default: 0 |
After the arguments, you define the script directory. This directory must contain a main.js file and a scenario.yml file, and optionally an rts.yml file.
Single mode examples:
The following commands execute multiple iterations of the script that resides in C:/MyScripts. The scenario defined in the scenario.yml file is ignored.
Windows | DevWeb.exe -mode=single -rts=C:\MyScripts\genericRts.yml ‑keyLocation=C:\Keys\secret1.txt -iterations=10 -pacing=3 C:\MyScripts\ExceptionalScript
|
Linux/MacOS | DevWeb -mode=single -rts=~/MyScripts/genericRts.yml ‑keyLocation=~/Keys/secret1.txt -iterations=10 -pacing=3 ~/MyScripts/ExceptionalScript
|
Load mode examples:
The following commands execute the script that resides in C:/ScriptDirectory, using the scenario defined in the scenario.yml file.
Windows |
|
Linux/MacOS |
|
Execute scripts from your IDE or code editor
You can run your DevWeb script from within your scripting tool. For details, see the information for your tool in Scripting with your IDE.
Replay summary
After running your script, a replay summary is displayed by default in the terminal window. The summary provides general information on the run, including data on throughput and hits.
Tip: The replay summary can be published in JSON format—for details, see Execute DevWeb scripts.
If you defined SLA rules for your transactions, the results for those are displayed as well.
Examples:
For single mode:
For load mode:
See also: