Step-by-step instructions to Provision Load Generators in the cloud for LoadRunner tests

(This post was written by Edo Nir, LoadRunner R&D)

 

LoadRunner 12.00 introduces a new feature of using cloud machines as load generators for running LoadRunner scenarios from the Controller. In this version, Amazon EC2 cloud service is supported.

This article will give detailed instructions for configuring and using this feature.

You can download LoadRunner 12 here to begin using this functionality right away!

 

Prerequisites

 

Create a Cloud Account

If you already have an account with Amazon EC2, you can skip this step.

To create an EC2 account, go to: http://aws.amazon.com/ec2/.

Once the account is in place, some configuration is required:

 

Create a Security Group

An EC2 Security Group is a configuration for allowing or disallowing specific traffic to and from a machine.

To use LGs in the cloud, you must use a security group allowing LG communication. Create a Security Group in your account management console with a custom TCP rule allowing inbound traffic on the port used for the communication between the Load Generator and the Controller. By default, LoadRunner uses port 54345. This can easily be changed using a network profile, covered later.
The source IP should be 'Anywhere', unless you will be using a Controller from a specific, single IP address.

 

Create a Key Pair [Optional]

 

An EC2 Key Pair is a security measure used for interactive logging in to cloud machines. This is not strictly required for using LGs on the cloud, but may be useful, in case you need to log into a machine manually, for third-party software installation or local log inspection.

If required, create a key pair in your account management console and save the generated .pem file.

 

Create an Access Key

LoadRunner's Controller uses EC2 API Access Keys to communicate with the cloud provider. An Access Key is composed of and Access Key ID and a Secret Access Key. This access key is different from your EC2 Web Console access credentials and must be created separately.

Follow the AWS documentation on creating an Access Key and save the Access Key ID and Secret Access Key.

 

Configure the Proxy Server

 If you are using the LoadRunner Controller behind a proxy server (for example, an enterprise proxy server), the proxy server must be configured to allow communication.

The following ports must be enabled in CONNECT method:

  • 443 – Used for communication with Amazon AWS API.
  • The port used for the communication between the Load Generator and the Controller. By default: 54345.
    Configuring this with a Network Profile is covered later.

Additional configurations include:

 

Set the Windows Internet Options

Make sure the proxy is locally configured in Windows Internet Options:

  • Open Windows Internet options. Do one of the following:
    • Run the 'inetcpl.cpl'  command
    • In Internet Explorer, choose Tools > Internet Options.
  • Select the Connection tab.
  • Click LAN Settings.
  • Configure your proxy server.

Configuration example:
    configuration example.png                   

 

Create a Controller Network Profile

Communicating with the LG over a proxy server requires a suitable Network Profile to be created in Controller.

  • In the Controller main menu go to Tools.
  • Select Network Profile Manager.
  • Click the Add button or click on an empty line in the Network Profile Name list and create a new profile. Be sure to select the 'Use proxy' checkbox and to fill the proxy server details, if required.
    In the Connection Mode section, you can define a different port, to be used for the Controller's communication with the load generators using this network profile.

 

 Network Profile Manager.png

 

Certificates

SSL encryption in used to ensure secure communication between the local LoadRunner Controller and Load Generator on the cloud machine.

You must own a CA certificate file and either a CA private key file or an SSL certificate file.

To create new certificates, run the gen_ca_cert.exe utility from the <LoadRunner root folder>\bin folder. Run it with at least one of the following options:

  • -country_name
  • -organization_name
  • -organization_unit_name
  • -eMail

This process creates two files in the folder from which the utility was run: the CA Certificate file, used to sign SSL certificates (cacert.cer), and the CA Private Key, used with the CA certificate to generate an SSL certificate (capvk.cer).

The following is an example of a command line string that will create two certificate files in the current folder:

gen_ca_cert.exe -country_name France -organization_name TestCo -common_name LoadRunner -CA_cert_file_name CAcert.cer -CA_pk_file_name CAprivate.cer

 

  • For more information on gen_ca_cert.exe, refer to the LoadRunner documentation.

Setup

These steps are required to allow communication with the cloud provider and access to the LGs on the cloud.

 

Configure Authentication Setting

Install the authentication certificates to enable secure communication with the LG (required for cloud LGs)

  1. In the Controller open the Tools menu.
  2. Select Authentication Settings.
  3. Select the certificate files (CA certificate and Private Key or SSL certificate).
  4. Click OK and follow the instructions. The Controller may need to be restarted.

 authentication settings.png

 

Add a Virtual Account

Follow these steps to configure the Controller with your cloud account:

  1. In the Controller open the Tools menu.
  2. Select Manage Cloud Accounts
  3. Fill in the account name and select an account provider.
  4. Fill in the access credentials (API access key and secret access key created earlier).
    The keys can be created and retrieved from the cloud provider's management console.
  5. Click Save (Credentials verification will be done against the cloud provider).

 

This dialog also allows you to configure machine termination delay, in case of collation failure. See LoadRunner documentation for more information.

 

 manage cloud accounts..png

 

Specify Load Generators
After the prerequisites are fulfilled and the setup is done, you are ready to provision and use cloud machines as LoadRunner load generators.

 

Provision new LG

  • In the Controller's Load Generators dialog, select Add from Cloud and then Provision New LG…
  • Fill in the basic information
    • Select the account you created.
    • Machine parameters will be retrieved from the cloud provider.
    • Increasing the number of load generator allows you to provision more than one machine with the same parameters.
    • Tick Terminate the load generator when load test is finished, if you wish the machines to be automatically terminated after the scenario run is completed and all the data was collated.
  • Initially, default parameters are selected. You can click More to specify other, provider specific parameters:
    • Region – Geographic location of the machines.
    • Instance Type – The machine's hardware type.
    • Image – The base installation of machine software.
      LoadRunner 12.00 support a Windows installation, as well as a Linux one.
    • Security Group and Key Pair – Explained above.
    • Note: the Key Pair parameter is not required, but if you plan to interactively log into the machine later, be sure to select the Key Pair you created in the cloud provider's management console before provisioning the machine/s.
    • If you are behind a proxy server, or using a non-default communication port,  go to the Connections tab and select the network profile created earlier (or create a new one) to be used with the provisioned machines.
  • Verify the provisioning parameters (amount, termination policy, machine parameters) before hitting the Provision button.

Once the new cloud machines are started, they will be added to the Controller's Load Generators list. Behind the scenes, certificates files are copied to the machine and the communication port is configured. The LoadRunner agent is also configured to check client certificate, to ensure a secure connection, since the machines are publicly available.

 

During provisioning, the load generator status is In Progress. This status indicates provisioning of the test machine on the cloud and launching the OS and load generator on this machine. This process can take a few minutes.

 

Once the load generator status changes to Down, it can be used for running a scenario. You can verify its availability by clicking the Connect button.

 

 create cloud load generator.png

Please note: Using EC2 Micro instance type is not recommended, as issues with running tests on it were encountered.

 

Use an Existing Load Generator

You can use running instances of cloud machines in your account, either provisioned through Controller, or manually created.

 

Prerequisites

To be used as load generators, cloud machines must have the Load Generator software installed and the LoadRunner agent software running.


The certificate file on the load generator must be signed by the same CA as the certificates on the Controller
The machine should also locally allow the communication ports mentioned above (for example, in Windows Firewall)

Machines provisioned through Controller (with HP provided images) are pre-configured to support this.

  • In the Controller's Load Generators dialog, select Add from Cloud and then Use Existing LG…
  • In the Use Cloud Load Generator dialog, select the account you created.
  • Select the machines you would like to add to the scenario.
  • If you are behind a proxy server, select the Network Profile created earlier to be used for the selected machines.
  • Click the Add Machine button to add the machines to the scenario

 

 add machine.png

 

Delete Load Generators

When not being used, cloud machines may still be incurring costs on your account. The Controller allows you to terminate cloud load generators directly from the scenario.

 

In the Load Generators dialog, select the machine you'd like to delete and click Delete…


You can either:

  • Delete from Scenario: the machine will be removed from this Controller, but it is still up and running.
  • Delete and Terminate: the machine will be removed from this Controller and also terminated from the cloud provider.

 delete load generator.png

 

Conclusion

Running LoadRunner tests using cloud generated load generators can greatly enhance the scalability of load tests for internet facing AUTs, while cutting costs and allowing easy management of cloud machines creation and termination.

Following these instructions (most of them only need to be done once) will allow you to easily control your tests and gain meaningful insights into your test results.

 

Click here to learn more about HP LoadRunner and HP Performance Center version 12.

 

 

Labels: Load Testing
Comments
Managed Services Dallas(anon) | ‎04-03-2014 09:51 AM

Hi  the information on this blog is just amazing it keeps me coming back time and time again ,personally i met my wife using this site so i couldnt like it any more i have done my best to promote this blog as i know that others need to read this thing ,Thanks for all your effort spent in making this fabulous resource ! ok,nice one Jake

wilsonmar | ‎07-31-2014 12:43 PM

If you want to log into load generators, add to the Security Group SSH port 22 or Custom port 3389 for Windows Remote Desktop. There are people staying up late at night scanning for these ports so it's best you limit what IP addresses are allowed in.

 

Also note that a different EC2 Key Pair needs to be created for each of 8 regions in Amazon.

Leave a Comment

We encourage you to share your comments on this post. Comments are moderated and will be reviewed
and posted as promptly as possible during regular business hours

To ensure your comment is published, be sure to follow the Community Guidelines.

Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Search
Showing results for 
Search instead for 
Do you mean 
About the Author
Malcolm is a functional architect, focusing on best practices and methodologies across the software development lifecycle.


Follow Us
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation