Scripts

Scripts form the backbone of your performance test. Your test definition can contain one or multiple scripts.

Create a script

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.

Script Tool Description  Supported Protocols Vuser Type
TruClient

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.

Note:

  • TruClient 12.02 scripts and above are supported.
  • Scripts created with TruClient Firefox .xpi extension are no longer supported.
  • TruClient - Web for Firefox, Internet Explorer and Chrome
  • TruClient - Mobile Web for Firefox

GUI Vuser

TruClient Lite

TruClient Lite is an extension to the Chrome browser that uses your local installation of Chrome to develop scripts.

TruClient - Web for Chrome GUI Vuser
TruAPI
  • TruAPI is an innovative scripting tool based on node.js.
  • TruAPI enables you to create JavaScript-based Vuser scripts and provides an API for handling transactions, think time, logging, and HTTP handling.
  • TruAPI scripts can be packaged and uploaded to StormRunner Load and added to a test definition.
  Web Vuser
VuGen

 

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.

  • Web HTTP/HTML
  • Mobile Application - HTTP/HTML
  • Web Services
  • Flex

    Flex scripts can run on on-premises load generators only.

  • Java

    Java protocols are supported on Windows only.

    The following Java protocols are supported:

    • Java Record Replay
    • Java Vuser
    • Java over HTTP
  • MQTT

Web Vuser

VuGen

Use VuGen to record scripts on supported Enterprise Resource Planning (ERP) protocols.

Note: SAP-GUI and Oracle NCA protocol scripts can run on on-premises load generators only.

  • SAP-GUI

  • SAP - Web
  • Oracle NCA

  • Siebel Web

    Note:

    • Siebel Web is supported only on cloud and Windows on-premises load generators.
    • You must add the ssdtcorr.dll file to the script. For details, see Siebel Correlation.
ERP Vuser
VuGen

Use VuGen to record scripts on supported legacy protocols.

Legacy protocol scripts can run on on-premises load generators only.

  • .Net

  • Citrix ICA

Legacy Vuser
Apache JMeter

Apache JMeter is an open source performance testing tool.

  • StormRunner Load supports JMeter scripts that use HTTP Request Sampler.
  • JMeter versions 2.11 - 3.2 are supported.
  • Upload a JMeter script to StormRunner Load in .zip format.
  • Include only one .jmx file in the root folder of the .zip file.

    If the JMeter script has dependencies on third party plugins, you can include them in the lib/ext sub folder of the .zip file.

    If the JMeter script has dependencies on external .jar files (for example, JDBC drivers), you can include them in the lib sub folder of the .zip file.

    Other dependent files, for example, a *.csv file for parametrization, and folders can be added into the .zip file.

  • If your JMeter script contains multiple ThreadGroups, only one will be enabled during a test run.
  • To report transaction data, use the Transaction Controller to enclose relevant test steps.

  • If you are running this script type with on-premises load generators, you will need to install the JDK (version 8 or later).
 

Dev Vuser

Gatling

Gatling is an open source performance testing tool.

  • StormRunner Load supports Gatling scripts that use HTTP requests.
  • Gatling version 2.1.7 is supported.
  • Upload a Gatling script to StormRunner Load in .zip format.
  • If there are multiple Gatling scenarios in a simulation, only the first scenario will be executed.
  • If you are running this script type with on-premises load generators, you will need to install the JDK.

For details, see Gatling scripts in StormRunner Load.

 

Dev Vuser

Selenium

Selenium is an open source performance testing tool.

  • StormRunner Load supports Selenium scripts that use the JUnit testing framework (version 4.12).
  • Selenium version 3.2.0 is supported.
  • You can only run Selenium scripts on cloud based load generators and not on on-premises load generators.
  • Upload a Selenium script to StormRunner Load in .zip format.
  • Metrics for Throughput and Hits per Second are not supported.
  • Taking snapshots on error is not supported.

For details, see Selenium scripts in StormRunner Load.

  GUI Vuser
LeanFT

LeanFT is a powerful and lightweight functional testing solution.

  • StormRunner Load supports LeanFT scripts that use the JUnit testing framework (version 4.12).
  • LeanFT version 14 is supported.
  • StormRunner Load LeanFT scripts support the Chrome 56 browser.
  • You can only run LeanFT scripts on cloud based load generators and not on on-premises load generators.
  • Upload a LeanFT script to StormRunner Load in .zip format.
  • Metrics for Throughput and Hits per Second are not supported.
  • Taking snapshots on error is not supported.

For details, see LeanFT scripts in StormRunner Load.

  GUI Vuser

Localized script support

StormRunner Load 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:

    ScriptLocale=<language code>

    For details, see Language codes.

Zipped files

Upload to the repository scripts that have been manually zipped.

Back to top

Manage scripts in the repository

The cloud repository houses all the scripts that you attach to your load tests. The following table lists the actions available to manage your scripts in the repository.

Action How to
Upload
  1. Click Upload.
  2. Select a .zip file to upload to the cloud repository.

    The TruClient extension automatically saves the script as a .zip file.

    For VuGen scripts, select File > Manage Zip Files > Export to Zip File.

    Tip: Drag and drop script files to upload.

Reload

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.

Note:

  • You can only keep runtime settings for scripts of the same type.
  • The option to keep runtime settings is not applicable for scripts loaded from a Git repository.
  • Run Logic runtime settings are not kept.
  • Local runtime settings for a script are always kept, whether or not the Keep runtime settings check box is selected. Global runtime settings are kept, or not kept, according to the status of the 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.
Runtime settings

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.

Assign labels Assign a label to a script. For details, see Labels below.
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.
  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.
  • Changes made in runtime settings will affect the script in related tests.
  • 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.

Back to top

Manage scripts in your Git repository

You can connect to an existing Git script repository and add those scripts to your StormRunner Load load tests.

For details, see Git integration.

Do the following to add or update a script from your Git repository to StormRunner Load:

Action How to
Access the Git repository

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

Select an agent

From the drop-down menu, select the agent that connects to the script repository you want to use.

For details on managing your Git agents, see Agents.

Select a script

Select one or more scripts from the Git repository. Click Add.

Sync Git scripts

Do the following to sync Git scripts:

  1. Select .
  2. Click and select Sync all or Sync selected to sync your scripts with the Git repository.

View script details

The center pane displays identifying script details including script name, description, and who created and last modified it.

Related test pane

This pane, located on the right, displays other load tests that contain this script.

Runtime settings dialog box

View or edit common runtime settings for the script.

Setting Description View
Additional Attributes Provide additional arguments for a Vuser script. Using this view, you can pass external parameters to prepared scripts.
Browser Configure the browser for TruClient Web scripts and the user agent for TruClient Native Mobile and TruClient Web scripts. Also configure proxy server connection settings for TruClient Native Mobile, TruClient Web, and TruClient Mobile Web scripts.
Browser Emulation Configure the user agent and simulate browser cache for browser related runtime settings for Web HTTP,Mobile HTTP, SAP Web, Flex, and Java HTTP scripts.
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.

Miscellaneous

 

Configure snapshot generation and action on error for TruClient.

Caution: Always option is not supported.

Mobile Device Enables you to change mobile device properties for TruClient Mobile Web scripts.
MQTT Enables you to change the MQTT runtime settings for MQTT scripts.
Pacing

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.
Proxy

Configure the proxy sever connection settings for Web HTTP,Mobile HTTP, SAP Web, Flex, and Java HTTP scripts.

Note: Proxy settings are ignored by cloud based load generators.

Replay Configure the replay of TruClient scripts.
Run Logic

Enables you to set the run logic runtime settings for a script. You can:

  • add or remove actions (vuser_init, action, or vuser_end) and blocks in a block.
  • change the sequence order of actions and blocks in a block (move up or down).
  • configure the number of iterations a block is run.
  • configure the run logic for a block as:
    • Sequential. The actions and blocks in each iteration of the block are run sequentially.

    • Random. The actions and blocks in the block are run with a probability of a user-defined percentage. For example:
      • You configure Block0 as random.

      • Block0 contains Action1 and Block1.

      • You configure Action1 as 20% and Block1 as 80%.

      • During the total number of iterations, Action1 and Block1 will run with a probability of 20% and 80% respectively (and not exactly 2 and 8 times).

    The total percentage of all the children in a block must equal 100%.

Note:

  • Run Logic settings are not copied when you copy runtime settings from one script to another.
  • Run Logic settings are not kept when reloading a script, even if you select the Keep runtime settings check box.

 

Think time Configure the think time settings, controlling the time that a script run waits between actions. These settings are designed to help you emulate a real user.

View snapshots

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.

Back to top

Labels

Use labels to organize scripts in the repository. Labels can be nested in sub-categories:

Example:  

Version1

Feature1.1

Feature1.2

Version2

Feature2.1

Feature2.2

Do one of the following:

Action How to

Create a label

 

  1. From the Labels pane, select to open the new label dialog box.
  2. Give the label a name.
  3. If desired, nest the label under another label.
  4. Click to select a label color.
Edit a label

From the Labels pane, highlight a label.

Click and select Edit.

Delete a label

From the Labels pane, highlight a label.

Click 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 and select Color.

Add a sub-label

From the Labels pane, highlight a label.

Click and select Add Sub-label.

Assign a label to a script
  1. From the scripts grid, highlight one or more scripts.
  2. Expand the drop down.
  3. Select the labels to assign to the script.

Use to search for a label name.

Filter scripts by a label

Filter scripts by a specific label.

In the Labels pane, highlight the label to search for.

Use to search for a label name.

Next steps: