Scripts

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.

Overview

A script is the recorded actions of a business process in your application. Your load test can contain one or more scripts.

To access downloads to the supported script tools, click the Tools and integrations button on the main banner and expand Scripting tools. For details of the tools you can use to create scripts for your load tests, see Scripting tools.

  • Use the Assets > Scripts tab to manage scripts globally in the OpenText Core Performance Engineering repository. For details, see Manage scripts as assets.

  • Use the  Load tests > Load profile pane to manage scripts for a specific test, without affecting the global script asset. For details, see Manage scripts within a load test.

Back to top

Manage scripts as assets

Use Assets > Scripts to manage scripts globally in the OpenText Core Performance Engineering repository, and make them available to all tests in your project. The Scripts tab displays all of the scripts that exist in the OpenText Core Performance Engineering repository.

The scripts list contains the following columns:

  • Name. The script's name.
  • Modified. The last time the script was modified.
  • Author. The user who added the script to the OpenText Core Performance Engineering repository.
  • Usage. The number of load tests using the script. For a list of the tests, open the Related tests tab in the Details pane.
  • Type. The script's protocol, such as Web HTTP, DevWeb, and TruAPI.
  • Labels. All of the labels assigned to the script. For details, see Assign labels.
  • Auto sync. For scripts that were uploaded or reloaded from a Git repository, this column contains a switch that enables you to create a permanent link to the repository. When selected, OpenText Core Performance Engineering automatically synchronizes the script's contents with the latest version in the Git repository before running the script. For details, see Add and manage scripts in a Git repository.

You can attach any of these scripts to a load test, upload new scripts, or reload existing ones. The following table describes the available actions:

Action Task
Upload

You upload a script in the form of a .zip file. For VuGen scripts, select File > Manage Zip Files > Export to Zip File.

To upload a script, do one of the following:

  • Click the Upload button Upload button and browse for the script's .zip file.
  • Drag and drop them into the Assets > Scripts page.

The following guidelines apply to the allowed number of scripts and their size:

  • The script size cannot exceed 200 MB.
  • The maximum number of scripts that can be added to a load test is 100 for trial versions and 500 for non-trial versions.
  • The maximum number of scripts that can be uploaded to a tenant is 500 for the trial versions and 30,000 for non-trial versions.

Note: This button is inactive if manual script upload/reload is blocked in the current project. Blocking manual upload/reload is only supported using the LoadRunner Cloud Public API. For details, see Public API.

Reload

Click the Reload button Reload button to reload the script in the OpenText Core Performance Engineering repository with an updated version. You can reload a script from the file system or from a Git repository. For details, see Reload scripts.

Note: This button is inactive if manual script upload/reload is blocked in the current project. Blocking manual upload/reload is only supported using the LoadRunner Cloud Public API. For details, see Public API.

Download Click the Download button Download button to download a copy of the script from the cloud repository to your local computer.
Duplicate Click the Duplicate button Duplicate button to duplicate the selected script. The duplicated script retains all of the applicable settings of the original scripts, such as runtime settings, data files, labels, and keys for DevWeb scripts.
Edit Click the Edit button Edit button to edit the selected script. For details, see Edit and view scripts.
Delete Click the Delete button Delete button to remove a script from the cloud repository.
Runtime settings

Click the Runtime settings button Runtime settings button to view or edit a script's runtime settings.

For further details, see Open the runtime settings.

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:

  1. Select a script with the runtime settings you want to copy.
  2. Click the Copy runtime settings button Copy runtime settings button.
  3. Select the script or scripts to be updated.

  4. Click Apply to apply the settings to the selected scripts.

Note:

  • Only scripts recorded in VuGen have runtime settings.
  • You can only copy runtime settings between scripts of the same type.
  • Only settings configured directly in the Runtime Settings dialog box, and that are common to both the source and target scripts, are copied.
  • Run Logic runtime settings are not copied.
  • When copying runtime settings in the Assets > Scripts page, only global runtime settings are copied. 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.
Data files Assign data files to a script. For details, see Assign data files below.
Keys Assign a script key to a DevWeb script. For details, see Assign a script key below.
Assign labels

You can assign a label to a script automatically when uploading the script, or manually after the script has been uploaded.

For details, see Assign labels below.

Back to top

Manage scripts within a load test

The load test's Load profile page shows all of the scripts that were added to current load test.

The following table lists the available actions:

Action Task
Add from assets

Click the Add from assets button Add from assets button to add a script that already exists in the OpenText Core Performance Engineering repository, to the load test.

Upload

Click the Upload button Upload buttonto upload a script in the form of a .zip file. For VuGen scripts, select File > Manage Zip Files > Export to Zip File.

The following guidelines apply to the allowed number of scripts and their size:

  • The script size cannot exceed 200 MB.
  • The maximum number of scripts that can be added to a load test is 100 for trial versions and 500 for non-trial versions.

Note: This button is inactive if manual script upload or reload is blocked in the current project. Blocking manual upload or reload is only supported using the LoadRunner Cloud Public API. For details, see Public API.

Download Click the Download button Download button to download a copy a script to your local computer.
Duplicate Click the Duplicate button Duplicate button to duplicate the selected script. You can use this in conjunction with the Add Prefix feature, to run multiple instances of the same script, and show their results with unique names.
Delete Click the Delete button Delete button to remove the selected script from the load test (but not from the OpenText Core Performance Engineering repository).
View/Edit Click the Edit button Edit button to edit the selected script. For details, see Edit and view scripts.
Copy scheduling

Click the Copy scheduling button Copy scheduling button to copy scheduling settings from one script to another.

Runtime settings

Click the Runtime settings button Runtime settings button to open the script's runtime settings for viewing or editing.

For further details, see Open the runtime settings.

Note: When editing runtime settings in this Load tests page, the changes are not applied globally.

Configure settings for multiple scripts Click the Configure settings for multiple scripts button Configure settings for multiple scripts button to perform actions that affect all selected scripts. Open the dropdown for a list of available actions.
Copy runtime settings

Allows you to copy runtime settings from one script to another:

  1. Select a script with the runtime settings you want to copy.
  2. Click the Copy runtime settings button Copy runtime settings button.
  3. Select the script or scripts to be updated.

  4. Click Apply to apply the settings to the selected scripts.

Note:

  • Only scripts recorded in VuGen have runtime settings.
  • You can only copy runtime settings between scripts of the same type.
  • Only settings configured directly in the Runtime Settings dialog box, and that are common to both the source and target scripts, are copied.
  • Run Logic runtime settings are not copied.
  • Note: When editing runtime settings in this Load tests page, the changes are not applied globally.

Assign data files to scripts Click the Assign data files to scripts button Assign data files to scripts button to assign data files to a script. For details, see Assign data files.
Set prefix

Lets you add a prefix to a script name.

This is useful if you want to run multiple instances of the same script and present their results separately in the dashboard, reports, and logs. Duplicate the script and add a unique prefix.

  • To add a prefix, select a script and click the Set prefix button Set prefix button. Add the desired prefix in the Set prefix dialog box.

  • To remove a prefix, click the Set prefix button Set prefix button and clear the contents of the Prefix field in the Set prefix dialog box.

Note: Prefixes can contain numbers, letters, hyphens, or underscores.

Back to top

Reload scripts

In the Assets > Scripts page, you can reload scripts to make sure that your test is using its latest version.

You can reload a script from the file system or from a Git repository. You can reload an existing script from Git, even if it was originally uploaded from the file system.

Note: If manual script upload/reload is blocked in the current project, the Reload button is inactive. Blocking manual upload/reload is only supported using the LoadRunner Cloud Public API. For details, see Public API.

To reload a script from another file on the file system:

  1. Click the Reload button Reload button.

  2. If a Git agent is connected to the project, expand the Reload dropdown and click Reload.

To reload a script from a Git repository:

  1. Make sure a valid Git agent is connected to the project. For details see Add and manage scripts in a Git repository.
  2. Expand the Reload dropdown and click Reload from Git.
  3. In the Reload script from Git dialog box, select an agent, repository and branch.
  4. Select the script you want to reload. Only select one script.
  5. Select Auto sync to instruct OpenText Core Performance Engineering to keep the script up to date from the Git repository.
  6. Click Reload.

Manage runtime settings

After you click Reload in the previous section's Reload script from Git dialog box, the Reload script dialog box opens.

To manage the runtime settings, select an option:

Option Description

Do not keep runtime settings

Instructs the reload not to keep the existing script's runtime settings. Instead, it uses the new script's runtime settings.

Keep runtime settings without run logic

Instructs the reload to keep the existing script's runtime settings and not use those included with the new script.

Keep runtime settings including run logic

Retains the Run Logic customizations of the existing script. If you do not select this option, when you reload a new script, the Run Logic properties of the new script are used.

Note:  

  • You can only keep runtime settings for scripts of the same type.
  • The option to keep runtime settings is not available for scripts uploaded from a Git repository.
  • If you want to retain the run logic, it must be compatible between the new and existing scripts. If it is not compatible, the run logic from the new script is used.

Runtime setting scenarios

The following runtime setting scenarios are possible depending on the script type.

Scenario Result

The existing and new scripts are of the same type and Keep runtime settings without run logic and Keep runtime settings including run logic are both selected.

All runtime settings are kept as they were in the existing script, including the runtime settings mode—global or local.

The existing and new scripts are of the same type and Do not keep runtime settings is selected.

All runtime settings are updated from the new script. The run logic is reset to the default value, local.

The existing and new scripts are of different types.

The Do not keep runtime settings and Keep runtime settings without run logic are ignored and all runtime settings are reset to their defaults from the new script. The runtime settings mode is reset to the default value, local.

Back to top

View script details

You can learn more about the selected script from the Script Details pane in the Assets > Scripts page. The Script Details pane displays additional information about the script and a list of tests and data files associated with the script.

Script Details pane

The Script Details pane, only available when a single script is selected, displays the following information:

Section Description
Summary

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.

In addition, you can track differences between runtime setting versions (see below for details).

Runtime settings version history

Enables selecting two runtime setting versions for comparison, and viewing the timestamp and modifier of each change.

  1. In the Runtime settings version history section, click the Details link.

  2. Select two runtime setting versions to compare in the Runtime settings version history dialog box. The Changed section displays a list of top-level section names included in the change.

  3. Click Compare to display the differences in the selected runtime setting versions.

Note:

  • Supported for scripts of the following protocols: Web HTTP, DevWeb, TruClient - Web , TruClient 2.0 - Web, TruClient - Mobile Web, and TruClient - Native Mobile.

  • Includes only global mode. Changes made in local mode are displayed on the History page of the associated load test. For details, see Load tests tab.

  • When a script is reloaded, all previous runtime setting history records are purged. In addition, runtime setting history data is not available if the script is deleted.

Git

If the script was uploaded from a Git repository, the pane displays general information about the relevant repository and branch.

Click Commit history to view details of the last 10 commits on the script.

Note:

  • The Commit history link is displayed only for scripts that were uploaded or synced with the OpenText Core Performance Engineering Git agent version 3.7 or later.
  • The commit history description displays only the first 100 characters for each included commit.
Related tests Displays all load tests that use this script.
Related data files Displays all data files used by this script.

Back to top

Upload Silk Performer scripts

To use Silk Performer scripts in your load test, you need to upload them through the Silk Performer Workbench.

To upload Silk Performer scripts:

  1. In the Silk Performer Workbench window, select File > Upload Project to > LoadRunner Cloud.

  2. In the Login step, enter the tenant and login information.

  3. In the Project step, select the OpenText Core Performance Engineering project into which to upload the script.

  4. In the User Types page, select the user types to upload. Click Finish.

For details on working with Silk Performer, see the Silk Performer documentation.

Back to top

Add and manage scripts in a Git repository

You can connect to an existing Git script repository and add those scripts to your OpenText Core Performance Engineering load tests.

For details, see Git integration.

Do the following to add or update scripts from your Git repository to OpenText Core Performance Engineering:

Action How to
Access the Git repository

Click the Upload button Upload button and select Upload from Git to open the Git repository dialog box.

Note: For shared Git agents, if multiple users upload or synchronize scripts using the same agent simultaneously, the uploading or synchronizing time increases.

Select an agent

From the dropdown 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 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:

  1. Turn on the Show Git only switch.

  2. Select the scripts you want to sync.

  3. Click the Sync button Sync button to sync your scripts with the Git repository.

Note: When you manually sync a Git script, runtime settings configured for the script in OpenText Core Performance Engineering are retained.

To sync Git scripts automatically:

Turn on the Auto sync switch 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 OpenText Core Performance Engineering, a message is added in the notifications area in OpenText Core Performance Engineering.

Note: When you automatically sync a Git script, the runtime settings configured for the script in OpenText Core Performance Engineering are retained.

Tip: To see a list and view the status of your uploads and syncs, click the Notification button Notification button in the banner. The Notification pane provides a time stamp and other relevant information for each event. If you have new notifications, the number above the button indicates the number of unread items. To delete an upload notification, hover over it and click x.

Back to top

Edit and view scripts

You can edit or view the script's files in a text editor from within OpenText Core Performance Engineering.

Caution:  

  • 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 are not 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:

  • Editing is supported for all script types with the exception of TruClient, Selenium JUnit, 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 are not retained if you perform a sync.

Note: To allow script editing, submit a service request to enable script editing for your tenant. If editing is not enabled, you are only able to view the supported scripts.

To view and edit the contents of a script:

  1. In the Load Tests tab, choose a test.
  2. Click Load profile to open the load test's Load profile page.
  3. Select the checkbox of the script that you want to edit. You can only make one selection at a time.
  4. Click Edit button .
  5. In the Edit script window, select the script file you want to view or edit.
  6. Click a page thumbnail to scroll to the section of the script that interests you.
  7. View or edit the script.

    Tip: Auto-completion is supported for DevWeb scripts.

  8. Click Save to save your changes. Your changes are saved globally—all tests that use this script are 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 the Edit button Edit button .

Back to top

Assign labels

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:

Labels dropdown list

You can perform the following actions for labels:

Action Task

Create a label

 

  1. Click the Expand labels pane button Expand labels pane button to open the Labels pane.
  2. In the Labels pane, click Create label to open the New label dialog box.
  3. Give the label a name.
  4. Optionally, nest the label under another label.
  5. Click the Select color button Select color button to select a label color.
Edit a label

From the Labels pane, highlight a label.

Click the More options button More options button and select Edit.

Delete a label

From the Labels pane, highlight a label.

Click the More options button More options button 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 theMore options button More options button and select Color.

Add a sub-label

From the Labels pane, highlight a label.

Click the More options button More options button and select Add sub-label.

Manually assign a label

You can assign a label to a script manually after the script has been uploaded.

  1. In the Assets > Scripts grid, select the check box of the scripts you want to label. For Results or Load tests, select one item in the grid.

  2. Click the Assign labels button Assing labels button, and select one or more labels to assign to the selected items.

Automatically assign a label

You can assign a label to a script automatically when uploading the script.

To assign a label to a script automatically, select the required label before uploading the script's .zip file or before dragging and dropping the script into the Assets > Scripts page.

Note: To assign a label to a script uploaded from a Git repository, you must use Git agent 2022.10 or later.

Filter by a label

You can filter scripts, load tests, and results by a specific label.

In the Labels pane, highlight a label or sub-label to filter the displayed items.

Labels pane example

Back to top

Assign a script key

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 the Create button Create button.

To assign a script key to a DevWeb script, select the script and click the Script key button Script key button . Select the script key you want to assign and click OK. The name of the assigned script key appears as part of the summary script information.

Note:  

  • 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 the Script key button Script key button, and then click Clear and OK.

Back to top

Assign data files

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 can assign multiple data files to a script. Save the data files in zip format, as described in Prepare data files.

Before assigning data files to scripts, upload the files to OpenText Core Performance Engineering from the Assets > Data Files tab. For details, see Upload and manage data files.

To assign data files to scripts:

  1. Open the Scripts page from one of the following tabs:

    • Click Assets > Scripts.

    • Click Load tests, select a load test, and click Load profile Load profile in the sidebar .

  1. Select a script and click the Assign data file(s) to scripts button Assign  data file(s) to scripts button . From the dialog box, you can assign up to five data files to a script.

    Note: To view Git data files only, select the Show Git only checkbox.

  2. Select the data files to assign to the selected script and click OK.

  3. To remove a data file assignment, repeat step 2, and clear the checkbox for that data file.

Note: By default, the total number of the data files that can be assigned to a single script cannot exceed 5, and the total size of the data files assigned to a single script cannot exceed 50 MB. If you need to change the default settings, submit a service request.

Back to top

See also: