Relative Paths for Scripts

You can specify a relative location for a script in your scenario. The location can be relative to the current scenario folder, or relative to the LoadRunner installation folder.

When you run a scenario, the script is automatically copied from this relative location to a temporary folder on the load generator running the script. This enables the load generator to access the script locally instead of over a network.

To specify a path relative to the current scenario director, type either of the following notations at the start of the script path:

Notation
Description
.\
Indicates that the path is relative to the location of the scenario folder
..\
Indicates that the path is relative to the location of the parent folder of the scenario folder

For example, if the current scenario is located at F:\scenarios, to specify that the script, user1, is located in F:\scenarios\scripts, you could type:

.\scripts\user1

To specify a path relative to the LoadRunner installation folder, type a percent sign (%) at the beginning of the script path. For example, if the LoadRunner installation folder is located at F:\LoadRunner, to specify that the script, user1, is located in F:\LoadRunner\scripts, you could type:

%\scripts\user1

Note: When specifying a relative path, you can include standard DOS notation (.\ and ..\) inside the path, as shown in the following example: M:\LR\my_tests\..\..\test.usr.

Back to top