Integrating Load Runner Professional

The focus of this guide is how to integrate Akamas with MicroFocus LoadRunner in order to leverage LoadRunner as a performance testing tool in an Akamas optimization.

Prerequisites

  • A working LoadRunner >=12.60 or LoadRunner Professional 2020 installation including a Controller, at least one Load Generator, and a valid license (see LoadRunner section below)

  • The server hosting the Loadrunner Controller should have:

    • Microsoft Windows Server 2016 or 2019

    • Powershell version 5.1 or greater

    • Winrm (see "Install Winrm" section below)

    • A Windows user (see "Create Windows users" section below):

      • with read capability on the LoadRunner results folder

      • with read capability on the Loadrunner test files (VuGen scripts and folder, lrs files, etc…) and their parent folders

      • and member of the following groups:

        • Remote Desktop Users

        • Remote Management Users

        • Users

    • The LoadRunner result folder must be configured either as a shared folder on the Controller itself or as a remote share, mounted on the Controller. (see "Create Shared drive" section below)

    • A working LoadRunner scenario (lrs file)

  • The server hosting the LoadRunner Controller must be reachable from the Akamas server at ports (see the schema here below):

    • 5985/TCP or 5986/TCP (see "Install Winrm" section below)

    • 445/TCP (see "Create Shared drive" section below)

    • 139/UDP (see "Create Shared drive" section below)

Install WinRM

Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol, a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows hardware and operating systems from different vendors to interoperate. Akamas leverages WinRM as a general communication mechanism with Windows hosts.

In the integration with LoadRunner WinRM is used to both invoke the performance test execution and to collect the resulting data. Therefore, the WinRM protocol must be enabled and configured on the Windows host where the LoadRunner Controller resides.

By default, Akamas' communication with Winrm is on port 5985 over HTTP and port 5986 over HTTPS (the latter is the recommended option). Both protocol and port fields need to be set accordingly in the Akamas operator configuration.

Notice that while Winrm is already installed out-of-the-box on every Windows deployment, additional configurations may be required for the Akamas integration to work.

Check Winrm configuration

You can verify the Winrm listeners' communication protocols & ports on the controller server by running the following command in a PowerShell console:

Winrm e Winrm/config/listener

Then check if a listener with a communication protocol (Transport) and port of your interest is present (both HTTP and HTTPS examples below, the output may vary)

Listener
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 127.0.0.1, 172.31.36.215, ::1, fe80::6c7e:3f6f:6aa0:f747%3

Listener
    Address = *
    Transport = HTTPS
    Port = 5986
    Hostname = S56R0J7
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint = a59cd522c0be2c5a9cd0173f31c6d89ddc86da83
    ListeningOn = 127.0.0.1, 172.31.36.215, ::1, fe80::6c7e:3f6f:6aa0:f747%3

If you have ssh access to the Akamas server, you can also verify the connectivity from Akamas to the controller server on the desired port by running the following commands on the Akamas CLI:

telnet <Loadrunner_server> <Winrm_listener_port>

If the output looks like the following one no additional configuration is required:

Trying <Loadrunner_server_IP>
Connected <Loadrunner_server>
Escape character is '^]'.

Otherwise, see below for a complete set of instructions on how to configure Winrm to work with Akamas.

Configure Winrm

To configure Winrm on the controller server open a PowerShell console (as Administrator) and run the following command:

Winrm quickconfig

Then press "y" to accept the basic configuration as per the following example:

Winrm service is already running on this machine.
Winrm is not set up to allow remote access to this machine for management.
The following changes must be made:

Configure LocalAccountTokenFilterPolicy to grant administrative rights remotely to local users.

Make these changes [y/n]?

Additional useful documentation is available on Microsoft KB.

Enable HTTPS

Akamas default and recommended approach is to connect to LoadRunner Controller using HTTPS protocol (default: port 5986).

Since Winrm out-of-the-box configuration does not include an HTTPS listener, you need to set it up as follows:

  1. create a valid certificate (or a self-signed one);

  2. create the listener and bind it to the certificate;

  3. add a Windows firewall inbound rule on port 5986.

To create the certificate on the controller server, open a PowerShell console (as Administrator) and get the host HOST_DNS_NAME running hostname. Take note of the HOST_DNS_NAME and replace it in the following command line to generate a self-signed certificate:

$cert = New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname <HOST_DNS_NAME>

To get the CERTIFICATE_THUMBPRINT from the certificate manager, run the command certlm.msc. The Certificate Manager will open, then choose:

  • open Certificates (local computer) → Personal → Certificates

  • open the certificate issued to HOST_DNS_NAME

  • copy the CERTIFICATE_THUMBPRINT from the details tab.

Take note of the CERTIFICATE_THUMBPRINT, substitute it and the HOST_DNS_NAME in the following command line and execute the resulting command line to create the Winrm https listener and bind it to the certificate.

Winrm create Winrm/config/Listener?Address=*+Transport=HTTPS '@{Hostname="<HOST_DNS_NAME>"; CertificateThumbprint="<CERTIFICATE_THUMBPRINT>"}'

To check the newly create Winrm HTTPS listeners run:

Winrm e Winrm/config/listener

Then check if in the output a listener is present with Transport set to HTTPS and Port set to 5986, as in the following example:

Listener
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 127.0.0.1, 172.31.36.215, ::1, fe80::6c7e:3f6f:6aa0:f747%3

Listener
    Address = *
    Transport = HTTPS
    Port = 5986
    Hostname = S56R0J7
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint = a59cd522c0be2c5a9cd0173f31c6d89ddc86da83
    ListeningOn = 127.0.0.1, 172.31.36.215, ::1, fe80::6c7e:3f6f:6aa0:f747%3

To allow inbound connections on port 5986 in the Windows firewall run

netsh advfirewall firewall add rule name="Windows Remote Management (HTTPS-In)" dir=in action=allow protocol=TCP localport=5986

If you have ssh access to the Akamas server, you can also verify the connectivity from Akamas to the controller server on port 5986 by running the following command from the Akamas CLI:

telnet <Loadrunner_server> 5986

The output should look like the following one:

Trying <Loadrunner_server_IP>
Connected <Loadrunner_server>
Escape character is '^]'.

Additional useful documentation about How to configure WINRM for HTTPS is available on Microsoft KB.

Create Windows user

Akamas requires a Windows user to start the Loadrunner test execution and retrieve the test data. The user account can be a local or a domain one.

All LoadRunner test files (VuGen scripts and folder, lrs files, etc…) and their parent folders, must be readable and writable by the user account used by Akamas

Please note username, password since you will need to add them to the operator configuration.

User groups

The user must be a member of the following groups:

  • Remote Desktop Users

  • Remote Management Users

  • Users

To add the user to the groups run the following steps:

  • Right-click on Start in Windows task

  • Open "Computer Management"

  • Expand "System Tools", then "Local Users and Groups", finally select "Users"

  • Select the appropriate user, right-click on it, and then select "Properties"

  • In the dialog window, select the tab "Member Of" and use the "Add" button to add the user to the required groups

User Permission

A user requires specific permissions to run a program through a WinRm session. To grant them, follow these steps on the controller instance:

  • Open a PowerShell terminal;

  • Run the command winrm configSDDL default. An ACL dialog window will open;

  • Use the "Add" button to add the appropriate user and then select "Read", "Write" and "Execute" permissions.

  • Close the dialog with the "OK" button.

Create Shared drive

The results generated by LoadRunner are imported into Akamas using the LoadRunner Telemetry Provider.

In order to upload the data, the results must be available on a CIFS network share which must be configured on the LoadRunner Controller instance. This can either be a shared Controller folder or a network share mounted on the server. Please notice that *this target folder should never be the default LoadRunner result folder (usually LoadRunner_home_folder/results).

Notice: the user created in the previous section should have read access only to the shared folder.

Please note the share name you have chosen, since you will need to add it to the operator configuration.

Share a Controller folder

  • Right-click on the folder, then select Properties

  • Go to Sharing tab, then select Advanced Sharing

  • In the opened window, enable Share this folder

  • In the "Share name" textbox type the name of the share. This is the name of the share over the network

  • Then click on Permissions, then Add

  • In the textbox type the name of the user or the group (with the domain if required) that you want to grant access to the share, then click OK

  • Select the added user (or group) and grant the required permissions

  • Click OK, OK, and then Close

Mount network share on the controller

  • Open "This PC" from the Start menu, then click on "Map network drive"

  • In the "Map Network Drive" window, select a suitable drive letter name and enter the remote folder path of the network share provided to you by your storage admin (it should be something with the format \mycompanyshareserver.mycompany\foldername)

  • Make sure to check "Reconnect at sign-in" and "Connect using different credentials".

  • Click Finish

  • In the "Windows Security" window enter the username (with the domain, if required) and the password for the network share and check "Remember my credentials".

  • Click Ok

Create Akamas entities

According to the standard Akamas implementation process, the following three steps are required to complete the integration with LoadRunner:

  • create one or more component(s): this requires specific LoadRunner properties to set for each web-application component modeling the service layer;

  • create one or more telemetry instance(s): this requires information on how to connect to the LoadRunner instance;

  • create the workflow task: this requires using the LoadRunner operator in a workflow task so as to get LoadRunner test execution (via Winrm) to be run as part of the workflow.

Component

At the component level, only a single empty property "LoadRunner" needs to be specified for the reference component type "Web Application". For more details about the component, see Integrating LoadRunner Professional provider.

The following represents a working example of a LoadRunner Web Application component:

name: konakart
description: konakart web application component
componentType: Web Application
properties:
  LoadRunner: ""

Create Telemetry instance

Akamas provides a dedicated LoadRunner telemetry provider which can be deployed as a telemetry instance. If the telemetry provider is not available on your Akamas installation (please check the telemetry provider section of the UI) you can get it installed by following the instruction on Setup LoadRunner Professional provider page.

After installing a telemetry provider a LoadRunner telemetry instance can be created by following the instructions provided on Create LoadRunner Professional telemetry instance page.

The following is an example of a LoadRunner telemetry instance definition:

provider: LoadRunner
config:
  hostname: lr_hostname
  username: administrator
  password: akamas
  shareName: akamas

For full details about the telemetry instance please refer to this section in the Akamas documentation.

Check LoadRunner metrics

Please notice that the Akamas integration to LoadRunner has been designed to only collect a subset of the metrics available on the LoadRunner Controller (e.g.: transactions_response_time_p99 or other percentiles values are not returned). The full list of the supported LoadRunner metrics is described on the LoadRunner Professional telemetry metrics mapping page.

Please verify the availability of a metric before defining your goal, constraints, and returned metrics.

Create Workflow task

A dedicated task based on the LoadRunner operator needs to be created in a workflow to test the integration. The LoadRunner operator is documented on the LoadRunner Operator page.

The following is an excerpt of a workflow definition featuring a LoadRunner operator configuration:

- name: test
  operator: LoadRunner
  arguments:
    controller:
      hostname: lr_hostname
      username: administrator
      password: akamas
    scenarioFile: 'C:\\Users\\Administrator\\Desktop\\lr\\Scenario1.lrs'
    resultFolder: 'C:\\Users\\Administrator\\Desktop\\lr\\results\\{study}\\{exp}\\{trial}'
    timeout: 15m
    checkFrequency: 30s

Please notice that in this excerpt:

  • All slashes on the scenarioFile and resultFolder paths should be escaped (\).

  • Regarding the resultFolder:

    • the placeholders between braces ..\{study}\{exp}\{trial} are replaced by Akamas at runtime in order to save the LoadRunner results of each study, experiment, and trial in a separate folder. Since this could lead to a huge disk usage in case of long-lasting studies, before starting a study please be sure to:

      • adopt all the LoadRunner best practices to reduce the size of the result (e.g.: log, snapshot, etc);

      • have enough disk space on the LoadRunner server (the space required by a study = expected size of the LoadRunner results * max number of planned experiments);

    • the full path, up to the ..\results folder, must exist;

    • the ..\results folder has to be shared and the share name has to match the shareName provided in the telemetry instance configuration; in our provided examples "C:\Users\Administrator\Desktop\lr\results" has to be shared as "akamas" and be to be available as \lr_hostname\akamas;

    • the path \{study}\{exp}\{trial} can be modified or completely removed to save the LoadRunner results over and over in the same folder to save disk space; in any case, this change must be reflected in the resultFolder of the telemetry instance (in our example, where resultFolder is set to 'C:\\Users\\Administrator\\Desktop\\lr\\results\\{study}, a resultFolder needs to be set to "{study}" in the telemetry instance)

  • In the controller section, if you set HTTP as protocol, then port 5985 needs to be used to communicate with winrm daemon on the LoadRunner instance. Notice that if only the port is specified, then Akamas will default to the HTTPS protocol to communicate with the LoadRunner instance.

Last updated