Run a performance test

This topic describes how to use LoadRunner Enterprise integration with Git plug-in to run a test using LoadRunner Enterprise. You can also configure the plug-in to fully automate all aspects of the testing process: create a test from a YAML file or YAML content, synchronize tests from YAML files saved in a GitHub repository to a LoadRunner Enterprise project, and then run the test in LoadRunner Enterprise.

Upload the plug-in to the Jenkins server

The LoadRunner Enterprise-Git integration plug-in enables you to synchronize performance test scripts from a Github repository to a project on the LoadRunner Enterprise server.

  1. Install the Jenkins server.

  2. Install the LoadRunner Enterprise integration with Git plug-in.

    For details on downloading and installing this plug-in, see LoadRunner Enterprise Integration With Git.

    1. Go to Jenkins home > Manage Jenkins > Manage Plugins > Advanced.

    2. In the Upload Plugin section, select the micro-focus-performance-center-integration.hpi file and click Upload.

    3. Restart Jenkins if required.

Back to top

Set up a Jenkins job to run tests using LoadRunner Enterprise

Set up a Jenkins job to run a performance test using LoadRunner Enterprise as described in Set up a Jenkins job to run tests in LoadRunner Enterprise, with the following changes:

  1. In the Build section, expand the Add build step drop-down and select Run Performance Test Using LoadRunner Enterprise (in step 6).

  2. In the Run Test section (in step 11), select Run an existing test, and enter the Test ID. You can get the ID from LoadRunner Enterprise > Test Management > Test Lab > Performance Test Set view. If the column is not visible, you can select it by clicking the Select Columns button.

Back to top

Create a LoadRunner Enterprise test from YAML input

Available in plug-in versions: 1.1.0 and later

When setting up a Jenkins job to run a performance test using LoadRunner Enterprise, you can create a new LoadRunner Enterprise test from YAML files stored in Git.

Set up a Jenkins job to run a performance test using LoadRunner Enterprise as described in Set up a Jenkins job to run tests in LoadRunner Enterprise, with the following changes:

  1. In the Build section, expand the Add build step drop-down and select Run Performance Test Using LoadRunner Enterprise (in step 6).

  2. In the Run Test section (in step 11), select Create a new test, and in the Test To Create box, enter text in YAML syntax representing a LoadRunner Enterprise test, or provide a path to a YAML file relative to the workspace.

    The content of the field must either be:

    • Text in YAML syntax composed according to the parameters described in the tables below. You must set values to the test_name and test_folder_path parameters, and continue with the test_content parameter and its sub-parameters.

    • You can also specify as a value a relative path to a YAML file within the workspace (or within your Git repository cloned within the workspace). In the YAML file, only specify the parameters defined in the test_content table. The following logic is used to create the LoadRunner Enterprise test:

      • The file name (without extension) is used as the test name.

      • The location of the file in the Git repository is the location of the test under the root folder ('Subject') in the test management tree.

      • The content of the YAML file must consist of the parameters, and their sub-parameters, listed in the test_content table below.

Note:  

  • All parameters must be in lowercase.

  • When a backslash (\) occurs in a value provided to a parameter (for example, a folder separator in a file path), a double backslash (\\) must be used instead.

Root parameters of the field:

Parameter Description Required
test_name The test name. Yes
test_folder_path

The location of the test folder in the test management tree of the LoadRunner Enterprise project.

Example: "MyMainFolder\\MySubfolder\\MySubSubFolder"

Note:

  • Use a double backslash (\\) to separate folders.

  • Do not include the LoadRunner Enterprise root folder (named "Subject").

Yes
test_content The content of the test that requires additional parameters specified in the test_content table below. Yes

test_content

If a YAML file is specified in the field, these are the root parameter to be used in the file content:

Parameter Description Required
controller

Defines the Controller to be used during the test run (it must be an available host in the LoadRunner Enterprise project). If not specified, a Controller is chosen from the different controllers available in the LoadRunner Enterprise project.

Available with plug-in version 1.1.1 and later: You can provision a Controller as a Docker image by specifying the value "Elastic" and providing a value for the controller_elastic_configuration parameter (see controller_elastic_configuration table below).

No
scheduler Defines the duration of a test, and determines whether virtual users are started simultaneously or gradually. See the scheduler table below. No
group Lists all groups or scripts defined in the test. The parameter to be used in each group are specified in the group table below. Yes
lg_amount Number of load generators to allocate to the test (every group in the test is run by the same load generators). Not required if each group defined in the group parameter defines the load generators it uses by the lg_name parameter (see group table below).
lg_elastic_configuration

 

(Available with plug-in version 1.1.1 and later)

Defines the image to be used to provision load generators. See the lg_elastic_configuration table below.

Yes, if a load generator is defined to be provisioned from a Docker image.
controller_elastic_configuration

 

(Available with plug-in version 1.1.1 and later)

Defines the image to be used in order to provision the Controller. See the controller_elastic_configuration table below. Yes, if the Controller is defined to be provisioned from a Docker image.

Back to top

Example scripts

Back to top

Run the job

Run or schedule the job as you would with any standard Jenkins job.

Back to top

Configure Trending Report Charts on Jenkins

For details, see Configure trending report charts on Jenkins.

Back to top

Tips and troubleshooting

For details, see Tips and troubleshooting.

Back to top