|
LoadRunner Scenario Run Monitoring with AutoIt Here are detailed yet concise tips and tricks for configuring LoadRunner Scenarios to monitor load and stress performance tests using AutoIt. This is a companion to pages on Vu Scripting, performance monitoring, performance tuning, and reporting. | Topics this page: |
|
Run-Time Metrics GraphsIt is a testament to the flexibility of the LoadRunner product that each shop usually has settled its own set of metrics to display during runs. The default metrics are: |
Scenario Setup Steps
Right-click on a graph for the context menu shown to the right/below. The pop-up is positioned below the cursor unless the cursor is so close to the bottom of the screen that the pop-up needs to be positioned above the cursor. So items within such context menus which can be anywhere is simpler and more reliably selected by a keypress send command rather than with a calculated mouse position. Blah. I wish that LoadRunner would underline these letters in menu choices. Here are the steps I go through to setup a Scenario from scratch (which the AutoIt script file lr91.8col.start.au3 automates): The monitors shown is limited to licensing restrictions. A separate license is required for each monitor. The online.pdf file describes each metric. In Menu > Scenarios, you can "Save Load Generator List as Default" and "Load Default Load Generator List". |
|
OverlaysI prefer to overlay each graph with the number of Running Vusers so it remains visible when I zoom in on a particular graph. Whenever an overlay is applied to a LoadRunner metric graph, LoadRunner creates a new metric graph which needs to be closed. The overlaid graph is then listed in the Merged Graphs within the Available Graphs list. The new graphic is created in this "fan-out" sequence when 8 graphs are displayed:
Whenever a duplicate is applied to a LoadRunner metric graph, LoadRunner places the new graph on an empty metric widow. This is why a metric that is duplicated or overlaid is added from metric window position 1,1 at the upper left corner. The metric in position 1,1 is populated last (if you're making duplicates and overlays). |
|
Duplicates for System Resource Graphs
This is the same for SiteScope and UNIX Resources. Whenever possible I arrange metrics from several subystems/components into by category of data:
These different categories are achieved in LoadRunner's run-time metrics graphcs by duplicating each System Resource Graph into the categories listed above. Duplicates are displayed under System Resource Graphs within the Available Graphs list. Blah. I wish that LoadRunner developers would add to the two Add and Delete buttons a hotkey (hinted by underlines). Keystroke Automation Scripting Options
There are several options for "server automation". But automatically replaying keystrokes such as needed for unattended installation may not be part of the capabilities. On the Windows platform, Microsoft has been improving PowerShell since 2006 to add features to the .bat files available since the first versions of the Windows operating system. Powershell now includes object-oriented features when Linux shell scripts are still working with only text. Its object orientation means that it can automate handling of objects from Microsoft Excel, Word, etc. That's somethine no other scripting shell offers. See https://developer.rackspace.com/blog/powershell-101-from-a-linux-guy/
But there is still one workhorse that refuses to die:
AutoIt Keystroke Automation Scripts
Download
Tutorial from Valutor
AutoIt works by compiling each script into an executable stand-alone .exe file that can be run
on target machines.
Tutorial from Valutor is and oldie but still a goodie. http://www.jesseweb.com/category/coding/autoit/ Books: Windows Admin Scripting Windows 2000 Admin Scripting Windows Admin Scripting 2nd Edition Windows Admin Scripting 3rd Edition Windows Admin Programing with Visual C# 2005 Surviving PC Mishaps, Disasters, and Blunders
YOUTUBE:
Playlist of tutorials
The AutoIt website offers a free IDE (SciTE.exe) to edit scripts, then compile in one Go step. (Scintilla-based) There are different executables for 32-bit (x86) and 64-bit machines. Begin with the Examples folder containing sample apps and scripts, such as the SampleControls.au3 in the GUI folder. AutoIt scripts have a file extension of .au3. They are written in VBScript format (with no semi-colons). Because the actions are scripted, I can do extra things (like changing the name of each metric graph) which is too time-consuming to do manually. My AutoIt ScriptMy script is coded using functions. Calls to functions are at the top of the file. Generic functions for use by any script are at the bottom. Functions specific to LoadRunner are in the middle. TODO: I would like to add code to update a file after each step. The script will then only execute steps that have not been completed. At the beginning of my script, the first call is to list information about the script and its environment. code was added to determine whether LoadRuner is running and to shut it down if it is. A sleep() function is used to avoid the "The controller is already open on this machine" error message issued by LoadRunner. Functions return -1 on failure. Pop-Up PositioningPop-up dialogs are especially challenging because they are positioned at different coordinates depending on the size of the screen (1024x768, 1920, etc.). This challenge is similar to scripting Citrix RTE using LoadRunner. This is why the preferred way to control the application is to send keyboard activity rather than using the mouse. When a mouse cannot be avoided, the solution is to define the anchor position of each dialog
$lr_popup_verti_start_pos = 243 These variables define the upper left corner of each pop-up dialog. AutoIt records the position of controls from the anchor point of the pop-up (not from the 0,0 point of the entire screen). LoadRunner Work-aroundWhen AutoIt does not recognize an object, it freezes. Keep these LoadRunner behaviors (gotchas) in mind:
I was successful working around some of the non-standard LoadRunner features.
Blah. I have not been able to figure out how to get AutoIt to control several LoadRunner pop-up screens: Overlay Graphs, Load Generators.
|