Share this page

# Run a performance test

This topic describes how to use the Git plug-in to run a performance test. 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 project, and then run the test.

In this topic:

## Upload the plug-in to the Jenkins server

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

1. Install the Jenkins server.

2. Install the OpenText Enterprise Performance Engineering integration with Git plug-in.

   For details on downloading and installing this plug-in, see 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

You can set up a Jenkins job to run a performance test.

1. In the Build section, expand the Add build step drop-down and select Run Performance Test Using OpenText Enterprise Performance Engineering (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 OpenText Enterprise Performance Engineering > 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 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, you can create a new test from YAML files stored in Git.

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

1. In the Build section, expand the Add build step drop-down and select Run Performance Test Using OpenText Enterprise Performance Engineering (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 an OpenText Enterprise Performance Engineering 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 table 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 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 test parameters, and their sub-parameters.

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.

Test root parameters in 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 project. Example: "MyMainFolder\\MySubfolder\\MySubSubFolder" Note: Use a double backslash (\\) to separate folders. Do not include the root folder (named "Subject"). | Yes
test_content | The content of the test that requires additional parameters. For details, see YAML parameters. | Yes

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

## YAML example scripts

The following are examples of YAML scripts. For details on the parameters used in the examples, see YAML parameters.

Example 1

    ##################################################
    test_name: mytestname
    test_folder_path: "Tests\\mytests"
    test_content:
      group:
        - group_name: "TEstInt"
          vusers: '20'
          script_path: "plugin\\TEstInt"
          lg_name:
    	 - "LG1"
    	 - "LG2"
        - group_name: "Mtours"
          vusers: '20'
          script_path: "plugin\\mtours"
          lg_name:
    	 - "LG3"
    	 - "LG4"
      scheduler:
         rampup: '45'
         Duration: '300'
    ##################################################

In the example above:

- The test name is "mytestname" and it is placed in the OpenText Enterprise Performance Engineering project under the folder path "Subject\\Tests\\mytests". Do not specify the root folder of the folders (which is "Subject"), in the parameter . The folder separator is a double backslash (\\).

- In the content:

  - Since no Controller and no load generator amount were specified, a random available Controller is allocated to the test just before it is run, and the lg_name parameter specified in each group is used.

  - In the group parameter:

    - Two scripts are added, each with a unique value in the group_name parameter, and the number of virtual users to run the group (vusers).

    - Since the ID of the scripts in the project is unknown, the script_path parameter (without "Subject") followed by the script name is used, with double backslashes for separators.

    - The load generators used by each group are specified (in this case, load generators are automatically matched because the 'LG' prefix is used).

- In the scheduler, all Vusers are initialized gradually (every 45 seconds), and the test will stop after 5 minutes (300 seconds).

Example 2

    ##################################################
    group:
      - group_name: "TEstInt"
        vusers: '20'
        script_path: "plugin\\TEstInt"
        lg_name:
    	 - "LG1"
    	 - "LG2"
      - group_name: "Mtours"
        vusers: '20'
        script_path: "plugin\\mtours"
        lg_name:
    	 - "LG3"
    	 - "LG4"
    scheduler:
       rampup: '45'
       Duration: '300'
    ##################################################

In the example above, a YAML file location is specified as the value, and the content of the file contains the code below:

- The plug-in automatically assigns the file name as the test name, and the folder path of the file in the Git repository is used to create the location of the test under the root folder ('Subject') in the OpenText Enterprise Performance Engineering project.

- In the content:

  - Since no Controller and no load generator amount were specified, a random available Controller is allocated to the test just before it is run, and the lg_name parameter specified in each group is used.

  - In the group parameter:

    - Two scripts are added, each with a unique value in the group_name parameter, and the number of virtual users to run the group (vusers).

    - Since the ID of the scripts in the project is unknown, the script_path parameter (without "Subject") followed by the script name is used, with double backslashes for separators.

    - The load generators used by each group are specified (in this case, load generators are automatically matched because the 'LG' prefix is used).

- In the scheduler, all Vusers are initialized gradually (every 45 seconds), and the test will stop after 5 minutes (300 seconds).

Example 3

    ##################################################
    controller: "mycontroller"
    lg_amount: 3
    group:
       - group_name: "JavaVuser_LR_Information_pacing_immediately_thinktime_ignore"
         vusers: 50
         script_id: 394
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "immediately"
    	java_vm:
    	   jdk_home: "C:\\Program Files\\Java\\jdk1.8.0_191"
    	   java_vm_parameters: "java_vm_parameters"
    	   enable_classloader_per_vuser: true
    	   use_xboot: true
    	   java_env_class_paths:
    		- "java_env_class_path1"
    		- "java_env_class_path2"
    	thinktime:
    	   type: "ignore"

       - group_name: "JavaHTTP_BigXML_pacing_fixed_delay_thinktime_replay"
         vusers: 50
         script_path: "scripts\\java_protocols\\JavaHTTP_BigXML"
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "fixed delay"
    	   delay: 10
    	java_vm:
    	   jdk_home: "C:\\Program Files\\Java\\jdk1.8.0_191"    java_vm_parameters: "java_vm_parameters"
    	   enable_classloader_per_vuser: true
    	thinktime:
    	   type: "replay"
    	   limit_seconds: 30

       - group_name: "JavaVuser_LR_Information_immediately_pacing_random_delay_thinktime_modify"
         vusers: 50
         script_id: 394
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "random delay"
    	   delay: 10
    	   delay_random_range: 20
    	java_vm:
    	   jdk_home: "C:\\Program Files\\Java\\jdk1.8.0_191"
    	   java_vm_parameters: "java_vm_parameters"
    	   enable_classloader_per_vuser: true
    	   java_env_class_paths:
    		- "java_env_class_path1"
    		- "java_env_class_path2"
    	thinktime:
    	   type: "modify"
    	   limit_seconds: 30
    	   multiply_factor: 2

       - group_name: "JavaHTTP_BigXML_pacing_fixed_interval_thinktime_random"
         vusers: 50
         #script_id: 392
         script_path: "scripts\\java_protocols\\JavaHTTP_BigXML"
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "fixed interval"
    	   delay: 10
    	java_vm:
    	   jdk_home: "C:\\Program Files\\Java\\jdk1.8.0_191"
    	   java_vm_parameters: "java_vm_parameters"
    	   enable_classloader_per_vuser: true
    	   java_env_class_paths:
    		- "java_env_class_path1"
    		- "java_env_class_path2"
    	thinktime:
    	   type: "random"
    	   limit_seconds: 30
    	   min_percentage: 2
    	   max_percentage: 3

       - group_name: "JavaHTTP_BigXML_pacing_random_interval"
         vusers: 50
         script_path: "scripts\\java_protocols\\JavaHTTP_BigXML"
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "random interval"
    	   delay: 10
    	   delay_random_range: 20
    	java_vm:
    	   jdk_home: "C:\\Program Files\\Java\\jdk1.8.0_191"
    	   java_vm_parameters: "java_vm_parameters"
    	   enable_classloader_per_vuser: true
    	java_env_class_paths:
    		- "java_env_class_path1"
    		- "java_env_class_path2"

       - group_name: "Mtours_pacing_random_interval"
         vusers: 50
         script_path: "scripts\\Mtours"
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "random interval"
    	   delay: 10
    	   delay_random_range: 20
    	jmeter:
    	   start_measurements: true
    	   jmeter_home_path: "c:\\jmeter"
    	   jmeter_min_port: 2001
    	   jmeter_max_port: 3001
    	   jmeter_additional_properties: "jmeter_additional_properties"

       - group_name: "Mtours_pacing_random_interval_Jmeter_default_port"
         vusers: 50
         script_path: "scripts\\Mtours"
         rts:
    	pacing:
    	   number_of_iterations: 2
    	   type: "random interval"
    	   delay: 10
    	   delay_random_range: 20
    	jmeter:
    	   start_measurements: true

    scheduler:
       rampup: 120
       duration: 600
    ##################################################

In the example above:

- The plug-in automatically assigns the file name as the test name, and the folder path of the file in the Git repository is used to create the location of the test under the root folder ('Subject') in the OpenText Enterprise Performance Engineering project.

- Since the controller and the lg_amount parameters are specified, the specified Controller is used to run the test, and three automatch load generators are used and shared by all groups.

- The content of the file is defined with seven groups, all being set with the rts parameter:

  - The pacing parameter is used with different options for all groups.

  - The java_vm parameter is used for five scripts with JavaVM for protocol.

  - The thinktime parameter is used with different options for four groups.

  - The jmeter parameter is used for two scripts with JMeter for protocol.

- In the Scheduler, all Vusers are initialized gradually (every 120 seconds), and the test will stop after 10 minutes (600 seconds).

Back to top

https://admhelp.microfocus.com Enterprise Performance Engineering,LoadRunner Enterprise 8942
Tips to improve your search results...OpenText™ Enterprise Performance Engineering Help Center OpenText™ Enterprise Performance Engineering Help 26.1 All View Local Help Center View Online Help Center Version: