Integrating LoadRunner Enterprise

The integration relies on InfluxDB acting as an external analysis server for LoadRunner Enterprise (LRE).

Integration Architecture

The following schema illustrates the components and networking connections you need to configure to setup the environment:

  • connection granted between the Akamas server and the LRE server (the one exposing LRE APIs) on port 443 - this connection is used by Akamas to invoke LRE APIs over HTTPs;

  • bi-directional connection granted between the LRE server (the one exposing LRE APIs) and InfluxDB on port 8086.: this connection is used by LRE to store analysis data into InfluxDB;

  • connection granted between Akamas server and InfluxDB on port 8086 - this connection is used by Akamas to collect LRE analysis data from InfluxDB.

Configure InfluxDB

The following assumes that you have already deployed your InfluxDB instance. For more information on how to deploy an InfluxDB instance. As a reference, please see here for a native deployment or here for a containerized deployment.

Once you have an InfluxDB deployment, you can configure it by running the following commands:

#create the admin of your influxdb instance (only for a brand new installation)
curl -X POST -G http://localhost:8086/query --data-urlencode "q=CREATE USER admin WITH PASSWORD 'admin' WITH ALL PRIVILEGES"

#create a specific admin user for the analysis database, it will be used by Akamas to retrieve the data
curl -X POST -G http://localhost:8086/query -u admin:admin --data-urlencode "q=CREATE USER akamasinfluxadmin WITH PASSWORD 'password'"

#create the database hosting the analysis data
curl -X POST -G http://localhost:8086/query -u akamasinfluxadmin:password --data-urlencode "q=CREATE DATABASE LR2020SP3"

#grant on the created database
curl -X POST -G http://localhost:8086/query -u akamasinfluxadmin:password --data-urlencode "q=GRANT ALL ON lr2020sp3 TO akamasinfluxadmin"

#retention policy settings
curl -X POST -G http://localhost:8086/query -u admin:admin --data-urlencode "q=CREATE RETENTION POLICY lr_default_rp ON LR2020SP3 DURATION 1d REPLICATION 1"

Since Akamas starts importing the LRE analysis data immediately once the execution is ended, there is no need to store data for a longer period of time than 1 day, which is the value set in the last command.

Please take note of the admin user credentials (akamasinfluxadmin | password in the example above) as you will need them later in order to configure the external analysis server on LRE.

Create LRE project and domain

It is recommended to create a dedicated LRE project to store the scripts and tests that you want to run using Akamas. It is also a good practice to also create a dedicated domain.

This can be done by accessing the administration panel on your LRE installation, whose URL should either look like the following:

http://your.lreserver.endpoint/admin/

or, in a multitenancy-enabled environment, like:

http://your.lreserver.endpoint/admin/?tenant=your-tenant-id-here

First, navigate to the Projects menu:

then click on the Manage domains button, add a domain and then fill in the required information:

Second, click on the Add project button and add a project:

and fill in the required information (make sure to select the correct domain), then click on the Manage domains button, add a domain and then fill in the required information:

Configure LRE external analysis server

Access the administration panel of your LRE installation and navigate to the Analysis Servers menu:

and then click on the plus button to create a new Analysis Server by filling in the required information:

Make sure that the linked projects section lists the dedicated project you have created in the previous step. This step is required to let LoadRunner publish the performance test metrics to InfluxDB for the selected projects.

Notice: you may want to test that the connection to InfluxDB is working correctly by clicking on the Test connection button.

Define LRE users & roles

It is recommended to reserve a dedicated user for executing performance tests that you want to run using Akamas.

To create this user please access the administration panel of your LRE installation, then navigate to the Users menu:

then click on the plus button to add a user by filling in the required information:

Please notice that:

  • this user must be associated with the project created before and it must have the Performance tester role

  • this user does not need to have any special admin privilege

Identify your test ID and Set

As a final step on the LRE environment, you need to retrieve the Test Identifier (ID) and the Test Set associated to the performance tests what will be executed by Akamas.

aside positive In the following it is assumed that you already have a test scenario defined in your LRE environment that Akamas will execute as part of an optimization study.

These test ID and test set can be retrieved from LRE Loadtest panel, which you can access it through a link which looks similar to:

http://your.lreserver.endpoint/Loadtest/pcx/login

or, for a multitenancy-enabled environment:

http://your.lreserver.endpoint/Loadtest/pcx/login??tenant=your-tenant-id-here

You can retrieve the ID by selecting the Test Management menu:

and then by clicking on the test that you want to execute: the ID is displayed next to the test name:

You can also retrieve the test set from the test details page: the test set is displayed in the upper right corner of the screen:

At this point, your LoadRunner Enterprise is ready to be integrated with Akamas.

Creating a Telemetry Instance

To leverage the integration with LoadRunner Enterprise via InfluxDB, a telemetry instance needs to be created on the Akamas side.

First of all, check whether the telemetry provider for LoadRunnerEnterprise is installed:

Then, create a telemetry instance as follows:

provider: LoadRunnerEnterprise

config:
  address: http://influx.dev.akamas.io
  port: 8086
  username: lr2020sp3
  password: password
  database: LR2020SP3

where:

  • address: it is the FQDN of the server hosting your InfluxDB instance

  • port: the port where InfluxDB is running

  • username and password: credentials of the InfluxDB schema created in the previous steps

  • database: the name of the InfluxDB database schema created in the previous steps.

Leveraging the integration

A workflow needs to be created for your specific offline optimization study by leveraging the LoadRunnerEnterprise operator to trigger the execution of a performance test.

The following only represents an example of a simple workflow that you can use to test your LRE integration. It contains just one task that triggers the execution of the specified performance test on LoadRunner Enterprise:

name: LRE simplest workflow
tasks:

- name: "LRE test"
  operator: "LoadRunnerEnterprise"
  arguments:
    retries: 0
    address: http://lre2020.akamas.io/
    username: johndoe
    password: password
    domain: akamasdomain
    project: akamas
    tenantID: "cf59c1a8-ad3d-4c9a-9222-edadaae7b8b9"
    testId: 183
    testSet: demotestset
    timeSlot: "30m"
    verifySSL: false

where:

  • address: it is the basic address of your LRE farm, where the tenant and any other URL or path parameter have been removed

  • username and password: the credentials that you have previously created in the LRE admin panel

  • domain and project: the domain and the project you have previously created in the LRE admin panel

  • tenantID: the ID of the tenant your project and user belong to - in case multitenancy is not enabled on your LRE environment, you can skip this parameter or set to the default value, thus fa128c06-5436-413d-9cfa-9f04bb738df3

  • testId: the test ID of the test that will be executed by Akamas (you should have already identified it in the previous steps)

  • testSet: the test set related to the test specified by testId (you should have already identified it in the previous steps)

  • timeSlot: it specifies the amount of time that LRE will reserve for running your test, therefore it must be greater or equal of the test duration

  • verifySSL: a flag to enable or ignore the SSL validation when connecting to LRE APIs - this flag is especially useful if your LRE environment exposes APIs over HTTPs with a self-signed certificate.

Last updated