Manage scripts

Scripts are used in LoadRunner Enterprise to emulate real user activities on your application. This topic provides an overview of how to create scripts and upload them to LoadRunner Enterprise to run your performance tests.

Vuser scripts overview

When you run a performance test, virtual users (Vusers) access your application concurrently in order to put load on your server. The actual steps that the Vusers perform when accessing your application are represented in a Vuser script. Each Vuser performs the actions recorded in one Vuser script.

You design Vuser scripts to emulate typical end-user activities on your application. For example, if you are testing performance on a Web site, the Vuser script emulates a real user accessing URLs, clicking links, submitting forms, and so on. When you create a performance test, you distribute your Vuser scripts among your Vusers.

Example: In the case of testing a Web site, you can specify that a portion of the Vusers run a Vuser script that emulates real users accessing your home page, a portion run a script that performs a search query, and a portion emulate the completion of an order form.

Upload and run scripts or tests in LoadRunner Enterprise

You can use Micro Focus's Virtual User Generator (VuGen) to record Vuser scripts, and then upload and run them in LoadRunner Enterprise. For details, see, Upload and run VuGen scripts.

After you have uploaded a Vuser script to LoadRunner Enterprise, you can edit the script parameters from LoadRunner Enterprise. For details, see Upload and run VuGen scripts.

You can also upload tests or scripts created in the following recording applications:

JMeter

For details, see Upload and run JMeter scripts.

DevWeb

For details, see Upload and run DevWeb scripts.

UFT Developer

For details, see Upload and run UFT Developer tests.

NUnit

For details, see Upload and run NUnit tests.

JUnit, Selenium

For details, see Upload and run JUnit or Selenium tests.

Note: The file path inside a script folder must not exceed 260 characters.

Back to top

Convert tests based on NUnit and JUnit to VuGen scripts

Before you can run tests based on NUnit and JUnit in LoadRunner Enterprise, you must convert them to VuGen scripts. To do so, you need to install the VuGen Script Converter and convert them to VuGen scripts.

  1. Download the VuGen Script Converter.

    The converter must be installed on a machine that has the same NUnit or JUnit Framework installed as the one used when creating the test.

    1. From the LoadRunner Enterprise navigation toolbar, click and select Download Applications.

    2. Select VuGen Script Converter and click Download.

    3. Install the script converter and run VuGenScriptConverter.exe.

    Note: VuGen Script Converter can be run from LoadRunner Enterprise host machine. To do so, select Start > All Programs > LoadRunner > Tools > VuGen Script Converter.

  2. Convert the test to a VuGen script.

    You can convert a test to a VuGen script using the script converter, or convert it automatically from a command prompt.

Back to top

Edit script parameters

This section describes how to edit parameters in a Vuser script from LoadRunner Enterprise.

Note: If you edit a parameter, the change will affect every performance test in the current project that uses the script.

To edit a parameter:

  1. From the LoadRunner Enterprise title bar, select Test Management (under Testing), and click a script in the Test Management tree. The Preview tab opens. For user interface details, see Create and manage tests.

  2. In the Preview tab, select an action and click the Edit Parameters button. Select the script parameters you want to edit and modify as required.

    Action Description
    Add Row
    1. Click Add Row.
    2. Click the row and enter a value.
    3. Repeat steps a. and b. until you have entered all the parameter values.
    Add Column

    You can add multiple columns of data.

    1. Click Add Column.
    2. Double-click the column and enter a value.
    3. Repeat steps a. and b. until you have entered all the parameter values.

    Note:  

    • Only File and Table type parameters are supported.

    • The parameters table is limited to displaying a maximum of 1000 rows or columns, and a file size of 2 MB. If these limits are exceeded, you must use VuGen for editing the parameter file.

    • Parameters can take a while to open and edit if they have a large number of rows and columns (above 100).

  3. Click Update to save your changes.

Back to top

Supported environments

In addition to testing Web sites, LoadRunner Enterprise can be used to test performance of non-Web environments. For example, you can test Citrix, MQTT, or Oracle NCA applications. For details of supported protocols, see the Virtual User Generator Help Center.

Back to top

See also: