Bugs in LoadRunner

Watch for my logic please:
  • Each program contains errors (bugs).
  • LoadRunner is a program too.
  • So, LoadRunner should contain bugs.
    Even more! LoadRunner contains bugs.

Here is a list of bugs in LoadRunner 9.10 that I noticed.
And I would like to ask you to share your experience on LoadRunner too. I'm sure that you faced with such errors.

Why do I do that?

  • I know, that some members of LoadRunner development team read this blog. So dear readers, you can report errors and make your favourite (I hope :)) LoadRunner better.
  • Also, there is another reason to post LoadRunner bugs. Since you are QA specialists, I think it will be interesting to find bugs in a released commercial product (= LoadRunner).
    Prove, that you are qualified bugs hunters! :)
11. LoadRunner Controller
2. Open Design tab
3. Double-click any action from 'Global Schedule' section
-> 'Edit Action' dlg is opened. OK
4. Click 'Help'
-> Nothing happens
'Help' btn doesn't work
21. Open LR Controller Help pdf-file, page 77.
2. It contains the phrase:
The following additional right-click options are available:
Reset IDs. Resets the IDs of the Vusers in the group.

Actually, menu item is named as "Renumber":
'Renumber' menu item
31. Open LoadRunner VuGen
2. Record and replay script
3. Open 'Tree view'
4. Select 'Response' item from tree view
-> 'Create Parameter' menu item is disabled, see:
5. Select 'Body' item from tree view
-> 'Create Parameter' menu item is enabled, see:
I think, 'Create Parameter' menu item should be enabled in both cases.
41. Open LoadRunner VuGen
2. Create new LR parameter
3. Open 'Parameter Simulation' dlg
-> There are not 'short keys' (underlined letters for quick access with keyboard):

5Could you send yours, dear reader?..

I think, the list of LoadRunner bugs is an interesting challenge for LoadRunner users community.
And definitely - it will be usefull for all of us.

That's why I ask you to send your
notes about LoadRunner bugs. Send detailed info and do not forget to mention your name. The world should know best testers :)

Please, send your notes about LoadRunner bugs or enhancements to my email: Dmitry Motevich's email
If you have any interesting ideas, feel free to share them.

Thank you in advance, dear readers.
Dmitry Motevich

P.S. Dear HP, may I join your LoadRunner team? :)

Related articles:

QTP RegExp VIDEO - How to click dynamic link?

The present QTP video explains how to click dynamic links, which change their text.
For example, the number of email drafts can vary:
Dynamic links - value changes
QuickTest Professional cannot know in advance which text will be present.

So, how QTP can click such dynamic links?
There are several possible solutions:
  1. We can use QTP Regular Expression to match dynamic link.
  2. We can use QTP DP (Descriptive Programming) in to find the link during run-time.
  3. We can use others properties of the dynamic link to identify it

The present QTP video shows first approach.
The tutorial covers the following:
  • working with QTP Object Repository
  • identification properties of QTP objects
  • QTP RegExp in object's properties
  • how QTP identifies objects in application
  • and others...
QTP RegExp VIDEO - How to click dynamic link?
Dmitry Motevich

QTP Descriptive Programming - How to perform operations on objects?

In previous QTP tutorial (QTP Descriptive Programming - How to get number of objects) I explained how to get number of objects (Edits, Links, Buttons) with QTP Descriptive Programming (QTP DP).

Today I'm going to show:
How to use QTP DP to perform different operations on objects.

For example, how to type text in these edit boxes on Google Sets page:
QTP DP - How to type in edit boxes?
From previous QTP DP tutorial you know that this code returns a collection of Edits located on Web page:
Set Desc = Description.Create()
Desc("micClass").Value = "WebEdit"
Set Edits = Browser("Google Sets").Page("Google Sets").ChildObjects(Desc)

So, to type text in each Edit, we have to process edit boxes
from returned collection one by one.
We can access the specified item from a collection by item's index.

For example, the following code types a text in the first edit box:

Edits(0).Set("Text in Edit #1")
And its result is:
QTP DP - Firt EditNote: ChildObjects returns zero-based collection of found objects.
That's why use Edits(0) to access first item, Edits(1) to access second item, and so on.

So, we add a loop to process all edit boxes on a page.
The final QTP script is:
Set Desc = Description.Create()
Desc("micClass").Value = "WebEdit"
Set Edits = Browser("Google Sets").Page("Google Sets").ChildObjects(Desc)

NumberOfItems = Edits.Count
For i = 0 To NumberOfItems - 1
    Edits(i).Set("Text in Edit #" & (i+1))

This code fills all Edits in. So, the result page looks like:
Result of QTP DPAs you can see - QuickTest Professional Descriptive Programming works correctly.

Note: If the initial page contains more (i.e. 8) or less (i.e. 3) number of edit boxes, our QTP script will work without changes!

Note: Since we do not use QTP Object Repository (QTP OR), this approach can be integrated easily into any existing QTP system. Shared
Object Repository is not required!

The article shows how to perform operations on objects.
The approach uses QuickTest Professional Descriptive Programming.

Related articles:

Do you like this QTP tutorial? Would you like to receive them in the future?
If yes, please subscribe to this blog RSS feed or by Email. (How to subscribe? VIDEO guide)

LoadRunner VIDEO tutorial - Parameters part3 ('Select next row' = 'Unique')

Here is last part of LoadRunner video tutorial on working with LoadRunner parameters.
It explains different combinations of the parameter setting 'Select next row' = 'Unique'.


LoadRunner parameters #1 - video tutorial is available here.
LoadRunner parameters #2 - video tutorial is available here.

The present LoadRunner video tutorial covers the following:
  • Settings on Parameter List dlg
    Option 'Select next row' = 'Unique'
    Option 'Update value on' = 'Each iteration'
    Option 'Update value on' = 'Each occurrence'
    Option 'Update value on' = 'Once'
    Option 'When out of values' = 'Abort Vuser'
    Option 'When out of values' = 'Continue in a cyclic manner'
    Option 'When out of values' = 'Continue with last value'
    'Allocate Vuser values in the Controller'
  • How to view an output value of LoadRunner parameter
LoadRunner parameters explained
part 3 of 3 (Select next row = Unique)

QTP Descriptive Programming - How to get number of objects

I'm going to explain and show QTP Descriptive Programming (DP) through Google Sets site:
(click image to enlarge it)

The goal of the present QTP tutorial is to describe:
How to get number of controls (Links, Edits, Images, etc) with QTP DP.

Let's investigate Descriptive Programming on examples.
First of all, we should understand what Descriptive Programming means:
What is QuickTest Professional Descriptive Programming (QTP DP)?

QTP DP is a run-time processing of objects which are not located in QTP Object Repository.

I've created new QTP script which starts with http://labs.google.com/sets page.
This QTP script is simple enough:
Set Desc = Description.Create()
Desc("micclass").Value = "WebEdit"
Set Edits = Browser("Google Sets").Page("Google Sets").ChildObjects(Desc)

MsgBox "Number of Edits: " & Edits.Count

And its result is:
As you can see, it works correctly and returns correct number of Edits on a page.
I'm going to explain this QTP script and answer the following question:

How does QTP Descriptive Programming work?

First of all, I've created new Description object:
Set Desc = Description.Create()
Description object contains collection of properties, which identify any UI object such as a browser, a page, a dialog, a list, a button etc.

To specify that we want identify all Edits on browser's page I use
"micclass" property:
Desc("micclass").Value = "WebEdit"
Note: the "mic" prefix in "micclass" stands for "Mercury Interactive Constant".

How do you know the class name ("micclass") of object?

Use Spy for that:
QTP Object Spy
Open QTP object Spy and check recorded properties of object.
For example, these are properties of Edit:
QTP Object Spy - recorded properties
As you can see, there is "Class Name" property and its value - "WebEdit". So, "WebEdit" is a value of Class Name of all Edits located on Web page.
"Class Name" is a synonym of "micclass".

I gathered Class Names of Web objects in this table:

Type of Web object
Class Name(micclass)
Web Browser
Edit box
Web Element
Combobox (DropDownList)

Since we created Description object for all edit boxes, we can use this description to get all specified objects ( = edit boxes).
The next step
returns the collection of all child objects (i.e. edit boxes) contained within the page:
Set Links = Browser("Google Sets").Page("Google Sets").ChildObjects(Desc)

To get the number of found objects in a returned collection, we use Count property:

MsgBox "Number of Edits: " & Links.Count

And the result is 5 found Edits on Google Sets page:
Number of Edits
So, this is a mechanism of QuickTest Professional Descriptive Programming.

Also, we can use the same code to get number of others objects - Links, Images, Buttons, etc.
For that I modified QTP script:

Function GetAllSpecificControls(Page, MicClass)
    Set Desc = Description.Create()
    Desc("micclass").Value =
    Set GetAllSpecificControls = Page.ChildObjects(Desc)
End Function

Function GetAllEdits(Page)
    Set GetAllEdits = GetAllSpecificControls(Page, "WebEdit")
End Function

Function GetAllButtons(Page)
    Set GetAllButtons = GetAllSpecificControls(Page, "WebButton")
End Function

Function GetAllLinks(Page)
    Set GetAllLinks = GetAllSpecificControls(Page, "Link")
End Function

Function GetAllImages(Page)
    Set GetAllImages = GetAllSpecificControls(Page, "Image")
End Function

Set oPage = Browser(
"Google Sets").Page("Google Sets")

MsgBox "Number of Edits: " & GetAllEdits(oPage).Count
MsgBox "Number of Buttons: " & GetAllButtons(oPage).Count
MsgBox "Number of Links: " & GetAllLinks(oPage).Count
MsgBox "Number of Images: " & GetAllImages(oPage).Count

The result of this QTP script is the following:
Results of QTP script
You can compare the result with the initial web page (see first image in the present article) and verify that QTP Descriptive programming works correctly - it returns correct numbers of objects.

  • I've explained and shown the mechanism of QuickTest Professional Descriptive Programming (QTP DP).
  • The present QTP tutorial explains how to get number of different objects - Edits, Links, Images, Buttons, etc.

I hope, that this article has helped you to understand QTP DP.
The future QTP tutorials will cover others questions on QTP Descriptive Programming.

Related articles:

Have you got interested materials or your own thoughts on QTP (QuickTest Professional)?
Let's share them and help each other to improve our skills and knowledge!
You can send them to my email: Dmitry Motevich's email

Thank you in advance, dear readers.

QTP - How to get number of pages in PDF file?

PDF file data extracting is not a trivial task in automated testing with QTP.
Recently I faced with a question:
How to get number of pages in PDF file?

In other words, how to get number of pages for any given PDF file, like on this image:
This is QuickTest Professional 9.5 User's Guide, located in \help\QTUsersGuide.pdf. It contains 1418 pages.
Let's see how we can get this number from QTP script.

I created the following simple VBScript for QuickTest Professional to extract number of pages in PDF file:
' Function GetNumPagesInPDF returns the number of pages in PDF file
' FileName - path to given ODF file
' If a file isn't found, then -1 will be returned

Function GetNumPagesInPDF(FileName)
    Dim oPDFDoc
    Set oPDFDoc = CreateObject( "AcroExch.PDDoc" )

    If oPDFDoc.Open( FileName ) Then
        GetNumPagesInPDF = oPDFDoc.GetNumPages()
        Set oPDFDoc = Nothing
        GetNumPagesInPDF = -1
    End If
End Function

I call GetNumPagesInPDF function with a full path of PDF file:
numPages = GetNumPagesInPDF("C:\Program Files\Mercury\QuickTest Professional\help\QTUsersGuide.pdf")
MsgBox "Number of pages: " & numPages

And the result of this QTP script is:
As you can see, our QTP script works correctly and extracts the number of pages in PDF file.

How does the above QTP script work?

use Acrobat OLE object - "AcroExch.PDDoc":
Set oPDFDoc = CreateObject( "AcroExch.PDDoc" )
It provides an interface for common Acrobat document opeartions, such as: opening/closing, working with pages etc.

To use "AcroExch.PDDoc" object, you have to install Adobe Acrobat (do not confuse with Acrobat Reader!) on your computer.
You can check whether "AcroExch.PDDoc" object is available on your computer. For that, open a registry and check the path:
If "AcroExch.PDDoc" key exists, then you can use Acrobat OLE Automation in your QTP scripts.
If not, then Adobe Acrobat should be installed.

Important note:
The above code can work without QuickTest Professional!
Just save the code into vbs-file and run. It will return the same result - number of pages in PDF file.

Related articles:

Do you have interesting topics and ideas to be explained and shown on this blog?
Please, let me know! Send them to my email: Dmitry Motevich's email