Scripts contain the actions of a business process and form the backbone of your performance test. Your test definition can contain one or multiple scripts.
A script is the recorded actions of a business process in your application. Your load test can contain one or more scripts. You can access downloads to supported script tools from the Home > Get tools pane.
The following table lists the tools you can use to create scripts for your load tests.
For details on supported versions, see Support Matrix.
|Script Tool||Description||Supported Protocols||Vuser Type|
TruClient is a tool for recording web-based applications as you navigate through your business process.
For details on supported browsers in TruClient, see Supported browsers in the TruClient Help Center.
Note: Scripts created with TruClient Firefox .xpi extension are no longer supported.
For details on working with TruApi, see TruAPI.
VuGen is a tool to record web-based applications on the transport level.
For further details on protocols, see VuGen Protocols in the VuGen Help Center.
General notes and limitations
When running a load test on load generators in the cloud, you can add host names contained in your load test scenario to the load generators that are uploaded. You do this by creating a text file containing the host names and IP addresses, and including the file with each VuGen script's zip file. For more details, see Add hosts to a cloud-based load generator.
Java protocol notes and limitations
For details, on how to add Extra Files, see Understanding the Solution Explorer in the VuGen Help Center.
|VuGen - ERP||
Use VuGen to record scripts on supported Enterprise Resource Planning (ERP) protocols.
Note: SAP-GUI and Oracle NCA protocol scripts can only run on on-premises load generators.
|VuGen - legacy||
Use VuGen to record scripts on supported legacy protocols.
Legacy protocol scripts can only run on on-premises load generators.
Apache JMeter is an open source performance testing tool.
Tip: We recommend using the latest supported version of JMeter to create your scripts. For details on supported versions, see Support Matrix.
Gatling is an open source performance testing tool.
For details, see Gatling scripts in LoadRunner Cloud.
Selenium is an open source performance testing tool.
For details, see Selenium scripts in LoadRunner Cloud.
LeanFT is a powerful and lightweight functional testing solution.
For details, see LeanFT scripts in LoadRunner Cloud.
Localized script support
LoadRunner Cloud supports scripts written in non-Latin alphabets. However, you still must use Latin characters for file and folder names.
For scripts developed prior to VuGen 12.53, do one of the following:
On a machine whose region locale is set to a non-Latin alphabet, open and save the script using VuGen 12.53.
Manually update the .usr file by adding the following setting to the General section:
For details, see Language codes.
Upload to the repository scripts that have been manually zipped.
You manage your scripts from the Assets > Scripts tab. The Scripts tab shows all of the scripts that exist in the LoadRunner Cloud repository. You can attach any of these scripts to your load test, or upload new scripts.
The following table lists the available actions:
You upload a script in the form of a .zip file. The TruClient extension automatically saves the script as a .zip file. For VuGen scripts, select File > Manage Zip Files > Export to Zip File.
To upload a script, do one of the following:
The following guidelines apply to the allowed number of scripts and their size:
Click Reload to refresh a script in the cloud repository.
If you want to keep the script's current runtime settings and apply them to the reloaded script, select the Keep runtime settings check box. To include run logic in the retained settings, also select the Include Run Logic check box.
|Delete||Click Delete to remove a script from the cloud repository.|
|Download||Click Download to copy a script from the cloud repository to your local computer.|
Click Runtime Settings to view or edit a script's runtime settings.
For further details, see Runtime settings dialog box.
Note: When editing runtime settings in the Assets > Scripts page, the changes are saved as global. This means that the settings apply to the script in any load test in which it is included, provided that the script is set to global mode for that specific load test.
|Copy runtime settings||
Copy runtime settings from one script to another:
|Assign labels||Assign a label to a script. For details, see Assign labels.|
|Keys||Assign a script key to a DevWeb script. For details, see Assign a script key below.|
You can connect to an existing Git script repository and add those scripts to your LoadRunner Cloud load tests.
For details, see Git integration.
Do the following to add or update scripts from your Git repository to LoadRunner Cloud:
|Access the Git repository||
Click and select Upload from Git to open the Git repository dialog box.
|Select an agent||
From the drop-down menus, select the agent, repository, and branch that connect to the script repository you want to use.
For details on managing your Git agents, see LoadRunner Cloud agents.
If you want all the scripts that are uploaded from the repository to be configured for auto sync, select the Auto Sync check box. You can also individually configure scripts for auto sync. For details, see Sync Git scripts .
|Select a script||
Select one or more scripts from the Git repository. Click Add.
|Sync Git scripts||
You can sync Git scripts both manually and automatically.
To sync Git scripts manually:
Note: When you manually sync a Git script, runtime settings configured for the script in LoadRunner Cloud are retained.
To sync Git scripts automatically:
Select the Auto Sync check box for the scripts you want to be synced automatically.
When a change to a script is made in the repository and the script is automatically updated in LoadRunner Cloud, a message is added in the notifications area in LoadRunner Cloud.
Tip: To see a list and view the status of your uploads and syncs, click the Notification button in the top banner, to the left of the project name. The Notification pane provides a time stamp and other relevant information for each event. If you have new notifications, the Notification button indicates the number of unread items . To delete an upload notification, hover over it and click x.
You can edit or view the script's files in a text editor from within LoadRunner Cloud.
- There is no option to revert to the former version of your script—version control is not supported.
- If you modify transaction names, your changes will not be reflected in the load test's SLA page .
- Syntax validation is not supported. We recommend that you validate your code in an external script editor.
The following guidelines apply to the editor and viewer:
- All test types are supported except for TruClient, Selenium JUnit, LeanFT, and JMeter.
- .NET scripts can only be viewed—not edited.
- The editor/viewer can show up to five levels in the script's folder structure.
- The editor/viewer may not display files that are humanly unreadable or exceedingly large.
- Changes to Git scripts will not be retained if you perform a sync.
Note: To allow script editing, open a support ticket and request to enable script editing for your tenant. If editing is not enabled, you will only be able to view the supported scripts.
To view and edit the contents of a script file:
- In the Load Tests tab, choose a test.
- Click to open the Scripts page.
- Select the checkbox of the script that you want to edit. You can only make one selection at a time.
- Click Edit.
- In the left pane of the Edit script window, select the script file you want to view or edit.
- Click a page thumbnail in the right pane to scroll to the section of the script that interests you.
View or edit the script.
Tip: Auto-completion is supported for DevWeb scripts.
- Click Save to save your changes. Your changes are saved globally—all tests that use this script will be affected. The Details pane shows the modification date and time.
Note: You can also edit script files from the Assets section. Go to Assets > Scripts, select the checkbox for a supported script, and click Edit.
The center pane displays identifying script details including script name, description, and who created and last modified it.
Additional script information pane
This pane, located on the right, displays the following information:
|General script details||Displays general information about the script, such as script type, by whom and when the script was created, and by whom and when the script was modified.|
If the script was uploaded from a Git repository, displays general information about the relevant repository and branch.
Click Commit history to view details of the last 10 commits on the script.
|Related tests||Displays other load tests that contain this script.|
View or edit common runtime settings for the script.
Note: Only the runtime settings that are relevant to the selected script type are displayed and can be configured.
|Additional Attributes||Provide additional arguments for a Vuser script. Using this view, you can pass external parameters to prepared scripts.|
Configure the browser, user agent, and proxy server connection settings for the script.
|Browser Emulation||Configure the user agent and simulate browser cache for browser related runtime settings.|
|Download Filters||Enables you to set the download filters for a script.|
|HTTP||Configure HTTP connection settings.|
|JMS Advanced||Enables you to set the JMS advanced runtime settings for Web Services scripts. For more information, see JMSTransport Overview below.|
|Log||Configure the amount and types of information that are recorded in the log.|
Configure miscellaneous settings for:
|Mobile Device||Enables you to change mobile device properties.|
|MQTT||Enables you to change MQTT runtime settings.|
Control the time between iterations. The pace tells the Vuser how long to wait between iterations of your actions.
You can control pacing either from the Load test > Script tab or Runtime settings > Pacing view. To select which setting is applied during run time, toggle the Local pacing check box in the script's settings in the Load test > Script tab.
|Preferences||Enables you to set various internet-related runtime settings.|
Configure the proxy sever connection settings.
Note: Proxy settings are ignored by cloud-based load generators.
|Replay||Configure replay settings.|
Enables you to set the run logic runtime settings for a script. You can:
Note: Run Logic settings are not copied when you copy runtime settings from one script to another.
|SSL||Configure SSL connection settings.|
|Think time||Configure the think time settings, controlling the time that a script run waits between steps. These settings are designed to help you emulate a real user.|
JMS is a J2EE standard for sending messages, either text or Java objects, between Java clients.
JMS implements Peer-to-Peer (also known as Point-to-Point) communication by defining a message queue as the target for a message. Multiple senders send messages to a message queue, and the receiver gets the message from the queue.
LoadRunner Cloud supports point-to-point communication by allowing you to send and receive JMS messages to and from a queue.
Before you can send messages over JMS transport, you need to configure the following settings that describe the transport. You configure these settings in the Runtime Settings > JMS Advanced view for a script.
|Use external VM||Enables you to select a different VM. If this option is not selected, Vusers use the JVM provided with LoadRunner Cloud.|
|Classpath||Specifies the Java classpath (vendor implementation of JMS classes).|
|Additional VM Parameters||Specifies extra parameters to send to the JVM, such as –Xms or –Xbootclasspath.|
|JNDI initial context factory||The fully qualified class name of the factory class that will create an initial context.|
|JNDI provider URL||The URL of the machine running the JNDI service.|
|JMS connection factory||The JNDI name of the JMS connection factory. You can only specify one connection factory per script.|
|JMS security principal||Identity of principal (e.g. the user) for the authentication scheme.|
|JMS security credentials||Principal’s credentials for the authentication scheme.|
|Number of JMS connections per process||The number of connections to create for each mdrv process. All Vusers sharing a connection will receive the same messages. Fewer connections gives better performance. Default=1, maximum=50 Vusers. Allowed values range is 1 – 50.|
|Received message timeout options||Select an option: Infinite wait – wait as long as required for the message before continuing. No wait – do not wait for the message, and return control to the script immediately. If there is no message in the queue, the operation fails. Specify timeout – use defined value. If no message arrives by the timeout, the operation fails.|
|User defined timeout||Specify the number of seconds to wait for the message before timing out.|
|Automatically generate selector||Select the checkbox if you want LoadRunner Cloud to automatically generate a selector for the response message with the correlation ID of the request.|
Snapshots, a visual representation of each script step, are displayed in a carousel on the right hand side of the script page. Double click the thumbnail to see the images in an enlarged view.
Note: Snapshots are currently supported only for TruClient scripts.
Use labels to help you organize scripts in your repository, or to organize your load tests in the Load Tests and Results pages. The labels you create are common to both scripts and load tests.
Labels can be nested in sub-categories:
Click to expand the Labels pane.
You can perform the following actions for labels:
Create a label
|Edit a label||
From the Labels pane, highlight a label.
Click the vertical ellipsis and select Edit.
|Delete a label||
From the Labels pane, highlight a label.
Click the vertical ellipsis and select Remove.
Removing a label also removes any sub-labels.
|Assign a color to the label||
From the Labels pane, highlight a label.
Click the vertical ellipsis and select Color.
|Add a sub-label||
From the Labels pane, highlight a label.
Click the vertical ellipsis and select Add sub-label.
|Assign a label||
Use the Search box to find a label name.
|Filter by a label||
You can filter scripts, load tests, and results by a specific label.
In the Labels pane, highlight the label or sub-label to search for.
Use the Search box to find a label name.
A script key contains an encryption key for an encrypted DevWeb script. By assigning a script key to a script, you can run the script without having to expose the encryption key within the script itself.
You create and manage script keys in Assets > Script Keys. For details, see Script keys. When assigning script keys, you can also create a new key by clicking Create.
To assign a script key to a DevWeb script, select the script and click Keys. Select the script key you want to assign and click OK. The name of the assigned script key appears in the right pane as part of the general script information.
- You can only assign a script key to a DevWeb script.
- You can only assign one script key to a script.
To remove an assigned key, select the script, click Keys and do one of the following:
- Deselect the script key you want to unassign and click OK.
- Click Clear and then click OK. This unassigns all the keys that are listed.
A data file contains information used by scripts. By assigning a data file to multiple scripts you can manage the data in one location rather than having to update multiple scripts for each change.
You upload and manage data files in Assets > Data Files. For details, see Data files.
- To assign a data file to a script, select the script and click Data files. Select the data file you want to assign and click OK. Note: You can assign only one data file per script.
- To unassign a data file from a script, select the script and click Data files. In the Assign a data file to scripts dialog box, click Clear.