From the new Micro Focus in AWS cloud and locally
Overview
- Amazon EC2 LoadRunner UI
- LR12.55 CE on Windows 2016
- Images from HPE/MicroFocus
- Configure Instance
- Other images
- Access server via RDP Windows
- Configure the Windows Instance
- Stop or Terminate instance
- Get Sample Scripts
- Install yourself manually
- Get Sample Scripts
- Run sample script
- Create a Vuser script in Visual Studio
- Wait, there’s more. Click one of these …
This is a hands-on tutorial on the different ways to get your hands on LoadRunner 12.55.
There are different scopes of what is installed on a machine:
-
“LoadRunner VuGen” client only for use with Performance Center central web server, which presents collects and displays run results on a web page rather than via Controller and local Analysis.
-
“LoadRunner Load Generator” only for call by a separate Controller or Performance Center. This is decribed at https://www.guru99.com/creating-amazon-ec2-instance.html and https://community.saas.hpe.com/t5/LoadRunner-and-Performance/Step-by-step-instructions-to-Provision-Load-Generators-in-the/ba-p/245072#.WaW1-pOGNZo
-
“LoadRunner UI” after full install of VuGen, Controller, and Analysis plus VTS and Load Generator on same machine for learning. This is the scope of this document.
Gaspare Marino, HPE Marketing, on August 30, 2017 points to version features in LoadRunner and Performance Center 12.55 to dispel competing vendors painting LoadRunner as a “dinosaur”.
Amazon EC2 LoadRunner UI
- Get an Amazon account.
-
In IAM, setup a different account than your master account used for billing.
- Get to EC2 from the AWS Management Console.
- Click “Launch Instance”.
-
Click Community AMIs and type LoadRunner.
-
Click the 4 results for “loadrunner” on AWS Marketplace.
LR12.55 CE on Windows 2016
I have enlisted the help of a company which specialises in the creation of secure/hardened images in AWS EC2. As of September 5, they are creating image:
“LoadRunner_12-55_CE_Windows-2016x64_50_Users” to contain all components of LoadRunner 12.55 CE (a 50 user license) on a base of Windows 2016 x64.This AMI use does not involve additional fees like HPE charges, only Amazon hourly fees. But I gladly take donations to my charity for the many hours of work figuring this out and documenting the steps here.
I am creating a PowerShell script to load what HPE’s images do not provide:
- Git for Windows
- Firefox browser to emulate
- Community Edition (CE) of Microsoft’s IDE Visual Studio 2017 CE
- Additional Components for VTS and Visual Studio
- Server management utilities
The remainder of this document describes creation and use of this image.
Let’s begin with use of the image. Futher down this document is a description of steps to use a base image, install, and “rebundle” for your use.
Skip to ConfigureInstance
Images from HPE/MicroFocus
“HPE_LoadRunner_12-53P4_Windows-2012R2x64150_Users…” and
“HPE_LoadRunner_12-53P4_Windows-2012R2x641050_Users…“
contains (the older) LoadRunner 12.53 Patch 4 on Windows Server 2012 R2 2012R2 x64.PROTIP: Notes from HPE developers is here as part of the Jan 4, 2017 release. This link should really be among AWS EC2 documentation.
MicroFocus has not gotten around yet to updating this for LoadRunner 12.55 under its name.
A HP/MicroFocus Performance Center AMI is not offered.
-
Click Select on the “Free Trial”.
CAUTION: “Free Trial refers to the 14-day grace period on what Amazon pays HPE/MicroFocus $25 per hour, which means $600 per day or $1,800 per month.
The expiration date is displayed here.
CAUTION: The extent it has been “hardened” for security I have not seen documented.
-
Click Continue.
Configure Instance
- Get to EC2 from the AWS Management Console: https://console.aws.amazon.com/console/home
- Login with your credentials.
-
Select the Region at the upper right. For example, the N. Virginia:
https://us-east-1.console.aws.amazon.com/ec2/v2/home?region=us-east-1#
PROTIP: If you are building a source AMI for AWS Marketplace, the region MUST be in us-east-1 region. AWS Marketplace will take the source AMI and clone for other regions.
- Click the blue “Launch Instance” button.
-
Select a base image: “Microsoft Windows Server 2016 Base” (Data Center Edition). It has a “Microsoft Windows 10” look and feel.
NOTE: If you were to construct a Load Generator instead, you would instead select “Amazon Linux AMI…”.
-
If you’re just working on installation, select “t2.micro” because it’s Free tier eligible.
PROTIP: Select “t2.medium” with 4 GB memory if you’re going to use it to do anything real.
- Click Next: Configure Instance Details.
- Select a VPC you’ve defined previously. If you haven’t, open another window and do that first.
-
You don’t need to with this instance. But other instances (such as for IIS servers), scroll down to expand Advanced Details to specify server start-up commands.
-
Click “Next: Add Storage”. Defaults are for the machine chosen earlier (for t2.micro, 30 GiB, General Purpose SSD, not encrypted).
PROTIP: Amazon’s current maximum volume size that can be given to a General Purpose volume is 16GB.
- Click “Next: Add Tags”.
-
Click “Add Tag”. In Key, type
Name
. In Value, typeLR1255.01
(or whatever to differentiate rather than “Web Server”).PROTIP: This is the name that appears in the EC2 Console, which doesn’t provide much room. So keep it short.
- Click “Next: Configure Security Group”.
- Use default “Create a new security group” and the random name created.
-
For Security Group Name, specify RDP port 3389 for use by “Windows Remote Desktop clients”.
NOTE: Since this is a Windows machine, SSH (via port 22) is not needed.
-
For its Source, select Anywhere because this is used during training by anyone.
CAUTION: This setup is not safe to handle corporate or HSI data.
- Click Add Rule. For its Type, select HTTP. Leave Port as 80. For its Source, select Anywhere.
-
Click Add Rule. For its Type, select HTTPS. Leave Port as 443. For its Source, select Anywhere.
NOTE: The LoadRunner port 54345 does not need to be specified for instances containing both Controller and Load Generator in the same server.
- Click “Review and Launch”.
- Click “Launch”.
-
Click OK to the security warning if it appears.
- Create a new key pair. (But in Quiklab, Choose an existing one.)
-
Type a Key Pair Name with a date and your initials, such as
“HPE_LoadRunner_12-53_P4_Windows-2012x64_50_Users-20171001-wm” for HP
“HPE_LoadRunner_12-55_CE_Windows-2016x64_50_Users-20171001-wm”
- Click Download Key Pair. .pem file. The default is your Downloads folder.
- Click OK to the download dialog.
-
Click Lauch Instances. CAUTION: Charges now begin accumulating..
NOTE: A “Thank you for subscribing…” email is sent to you from AWS Marketplace <no-reply-aws@amazon.com>.
PROTIP: Immediately set an hourly alarm 50 minutes from the time stamp on the email. Amazon charges by the hour. So if you stop before the hour is up, you’ll still be charged for the whole hour.
Other images
TODO:
- Docker image https://hub.docker.com/r/wilsonmar/loadrunner-1255-win10
- TODO: Microsoft Azure
- TODO: Google Cloud Compute
Access server via RDP Windows
This applies to Windows servers everywhere, not just in the AWS EC2 cloud.
-
See “Use RDP (Remote Desktop Protocol) clients to access Windows Servers”
Configure the Windows Instance
-
Refer to my “Windows 10 client configuration page”.
-
Click the Windows icon and type enough of
server manager
for it to appear in the list. Click on it in the list. -
Click the File Explorer icon on the Task Bar. Click This PC. Notice the space remaining free:
Stop or Terminate instance
PROTIP: Stopping an instance enables you to change the RAM, and even the instance type to a bigger or smaller machine.
CAUTION: Stopping, then starting an instance re-starts the billing clock such that if you stop and start an instance within the same hour, you will be billed for two hours.
-
To stop an instance in the EC2 Console, right-click on your instance name:
If you select Stop of the instance, usage fees will stop. However, the root volume of the instance (EBS volume, also called “Provisioned storage”) is preserved and storage charges will continue to accure. Other devices that are attached to the instance keep on running, accumulating charges.
You can now make an AMI of the instance just created.
-
If you select Terminate, you will need to go through the steps to create a new instance.
Since the .rdp file for the instance downloaded are no longer valid:
- Delete the .rdp file from your local machine.
- Remove the instance from your RDP client.
Get Sample Scripts
Download Git repository containing bootstrap script:
- Open a Git Bash window.
-
cd to where you add Git repositories:
cd gits;
git clone https://github.com/wilsonmar/loadrunner.git --depth=1
git clone https://github.com/wilsonmar/git-utilities.git --depth=1
Install yourself manually
There are several steps to this:
Download Installers
- Invoke the Internet Explorer browser. (Firefox browsers don’t recognize the website’s Download button)
-
https://software.microfocus.com/en-us/download/loadrunner
Download CE core installer
- Right-Click to Download “Community Edition”.
-
Click the green Download button for: HPELR_1255_Community_Edition.zip (919 MB)
- In general, if you see a pop-up to save your password, just say NO, NEVER.
-
WARNING: If you press Alt+left for the previous browser page, another download will start.
-
PROTIP: Click the previous browser tab containing the list of downloads.
Download Additional Components
-
Click to Download “Additional Components” (for VSTS). HPELR_1255_Community_Edition_Additional_Components.zip ( MB)
-
Other links:
“Useful resources”
“Tech talks” is still https://community.saas.hpe.com/t5/LoadRunner-Performance-Center/ct-p/sws-LoadRunner
“HP LoadRunner Help” is https://lrhelp.saas.hpe.com/en/12.55/help/WebHelp/Content/Resources/_TopNav/_TopNav_Home.htm
Extract Installer Zip files
- Double-click to Extract file HPELR_1255_Community_Edition.zip.
- Click “Extract” on the menu line. Click “Extract All”. Click “Extract”.
- On the Windows Explorer left pane, click “Downloads”.
-
Right-click on the zip file to Delete it (to recover disk space).
- Double-click to Extract file HPELR_1255_Community_Edition_Additional_Components.zip.
- Click “Extract” on the menu line. Click “Extract All”. Click “Extract”.
- On the Windows Explorer left pane, click “Downloads”.
-
Right-click on the zip file to Delete it (to recover disk space).
Invoke Base Installer
- On the Windows Explorer left pane, click “Downloads”.
- Double-click to open the HPELR_1255_Community_Edition folder.
- Right-click on the HPELR_1255_Community_Edition.exe Application to select “Run as Administrator”.
-
If the UAC appears, click Yes.
-
If you’re installing into a WorkSpace, change the path from C:\Temp\… to D:\Temp.
- In the Installer, click Install.
-
Click OK to install the Redistributables.
Installed include C++ 2013.
-
When the “Welcome to the HPE LoadRunner Setup Wizard” appears, click Next.
- When the “End-User License Agreement” dialog appears, check “I accept”.
-
Uncheck “Participate in VuGen Improvement Program”.
- Click Next.
-
When the “Change destination folder” dialog appears for
C:\Program Files (x86)\HPE\LoadRunner\
PROTIP: The “Program Files (x86)” location means LoadRunner is a 32-bit program.
-
Click OK.
-
When the “Ready to Install” dialog appears, click “Install”.
It will take a while for the Setup Wizard to install LoadRunner.
-
When the “HPE Authentication Settings” dialog appears, uncheck “Specify a certificate that will be used…”.
- Click Next.
-
When the “Completed the HPE LoadRunner Setup” dialog appears, uncheck “Install HPE Network Virtualization”.
- Uncheck “Launch License Utility Tool on Exit”.
-
Click Finish.
PROTIP: Do not delete the installer .exe files because they may be needed in the future.
Manage LoadRunner Icons
-
Right-click on the Windows “start” icon to select Desktop.
Notice LoadRunner’s application icons.
Install VTS Additional
VTS (Virtual Table Server) is a node.js application that runs outside of LoadRunner. Thus, VTS is placed under the HP folder because it can be used by other systems, not just by LoadRunner. VTS enables data to be manipulated outside of LoadRunner scripts running on load generators.
Data can be imported into VTS several ways. CSV (Comma Separated Values) can be imported, perhaps after editing using Excel or other spreadsheet program. External systems can dynamically (during runs) make web services requests to change data in VTS. There is a web page for manual.
#### A) Download from HP Marketplace
https://marketplace.saas.hpe.com/appdelivery/content/virtual-table-server
#### B) Additional Components
- In Windows Explorer, be at your account’s Downloads folder.
- Right-click on the HPELR_1255_Community_Edition_Additional_Components.exe Application to select “Run as Administrator”.
-
If the UAC appears, click Yes.
Install VTS
- Click “Install”. If you are installing in WorSpaces, changd from
C:\Temp\\...
to<strong>D:</strong>\Temp
- Navigate into folder
Temp\HPE LoadRunner 12.55 Community Edition\DVD\Additional Components\Virtual Table Service
- Right-click on SetupVTS Application and select “Run as Administrator”.
-
Click Yes to UAC.
- Change C:\TempHPE LoadRunner VTS 12.55 to D:\Temp\HPE LoadRunner VTS 12.55 Click Next, then Next.
- Check “I accept the terms…”. Click Next. Click Install to
C:\ProgramData\HP\VTS\db\data
. - Click Install.
- Click Finish for a pop-up browser containing a link to http://localhost:4000/
- Click Enable.
-
Enable Access from Script.
-
Open Windows Explorer to see how much disk space remains.
Populate VTS with Data
TODO: Move steps from LoadRunner Tutorial to here:
http://www.briandunning.com/sample-data
Install WebTours
Since version 12.55, the WebTours sample application has been moved.
- Download it from: https://marketplace.microfocus.com/appdelivery/content/web-tours-sample-application
- Unzip the WebTours.zip.
- Double-click to run “strawberry-perl-5.10.1.0.msi.
-
Click the “I accept…”, then Install. Click Yes to UAC. Click Finish.
- Extract all files in WebTours.zip.
- Open a Run cmd windows. Navigate to the folder.
- Type StartServer.bat to invoke the server. Leave it running.
-
Open a web browser to:
http://127.0.0.1:1080/WebTours/index.htm
-
In the browser, bookmark the site.
Populate VTS
TODO:
VuGen
-
Copy this and paste it in a cmd window:
echo D:\Users\%USERNAME%\gits\loadrunner\gapi-lr-starter\gapi-lr-starter.usr
Copy the response to your Clipboard to paste into VuGen
Alternately, double-click on the file within Windows Explorer.
PROTIP: The install process enables double-clicking on a .usr file extension to invoke VuGen.
- Click the Windows logo at the lower-left corner of the screen.
- Click Virtual User Generator.
- Maximize the screen by clicking on the button at the upper-left corner.
- Click File, Open. Paste the path from above or navigate to open the .usr file.
Get Sample Scripts
-
In VuGen, click “Version Control”, “Git Options”, “Import from Remote Repository”.
-
In the “Remote Repository URL”, type the URL to a GitHub repository:
https://github.com/wilsonmar/loadrunner
The dialog automatically obtains the repository name from the URL.
PROTIP: The default folder for VuGen scripts is:
C:\Users\Administrator\Documents\Scripts
- Click VuGen File, Open, Solution. Select the path above.
- Click to open “gapi-lr-starter.usr” in VuGen.
Run sample script
- Click Run. Let it finish running.
-
View the Output pane.
PROTIP: Get your own Google API Key.
Create a Vuser script in Visual Studio
WARNING: LoadRunner is typically several months behind each Visual Studio release in order to come up with integrations.
-
Use Windows Explorer to view folder
C:\Temp\HPE LoadRunner 12.55 Community Edition\DVD\Additional Components\IDE Add-Ins Dev
Specific versions of Visual Studio is supported:
LRVS2013IDEAddInSetup.exe
supports Visual Studio 2013.LRVS2015IDEAddInSetup.exe
supports Visual Studio 2015.
PROTIP: Even if the latest version is not supported, you can still use Visual Studio and LoadRunenr separately.
-
Install the Visual Studio IDE add-in the version of Microsoft Visual Studio.
In Visual Studio, select the appropriate template from the Installed Templates LoadRunner VB | C++ | C# .NET Vuser. Visual Studio creates a new project with one class and a template for a Vuser, and the script file, |
The following example shows a Visual C# template:
public int Initialize()
{
// TO DO: Add virtual user’s initialization routines
return lr.PASS;
}
public int Actions()
{
// TO DO: Add virtual user’s business process actions
return lr.PASS;
}
public int Terminate()
{
// TO DO: Add virtual user’s termination routines
return lr.PASS;
}
Add code to the template, in the TODO sections.
Open the Object Browser (View menu). Expand the LoadRunner node (for example Interop.LoadRunner) to see the LoadRunner elements. Add the desired elements to your script, such as transactions, rendezvous points, and messages.
Expand the Toolbar menu, Vuser, and enhance your script with runtime settings and parameters. For more information, see the runtime settings General > Run Logic or the Parameter List Dialog Box.
Use the Vuser menu to replay the script and test its functionality.
Select Vuser > Create Load Scenario, to create a LoadRunner scenario using this .usr file.
You can also build the LoadRunner project as a DLL file, which will be saved in the same folder as the project. You can reference this DLL directly from a LoadRunner scenario.
Wait, there’s more. Click one of these …
This article is one of a series about tuning and performance:
- Performance testing in the cloud era
- Perftest (Performance Testing and Engineering)
- Agile Performance Testing and Engineering
- Build load-balanced servers in AWS EC2 using CloudFormation
- JMeter in the cloud for distributed performance testing
- TruWeb performance testing on macOS and Linux clients
- JavaScript in LoadRunner
- LoadRunner Javascript coding
- LoadRunner 12.55 installation
- WebTours configuration in LoadRunner and others