You are on page 1of 25

QuickTest Professional 9.

5 Review

The AdvancedQTP Review of QTP 9.5


By Yaron Assa, Dani Vainstein and Meir Bar-Tal, Copyright © 2008 AdvancedQTP

This is the official QTP 9.5 review of the AdvancedQTP team


which was prepared during the QTP 9.5 beta process. We hope that this
review will help the QTP community make the transition to the new
version easier, as well as foster and encourage HP to take care of the
points raised for improvement.

Enjoy!

- The AdvancedQTP Team

Improvements to the Installation Process

QTP 9.5 incorporates several improvements to the installation process. The


most dramatic change is offering an all-in-one install for all the supported environments
delivered on a single DVD. Coupled with an all-in-one license option, this simplifies the
installation process considerably. However, the financial implications of such an all-in-
one license are still left to be seen (though previous add-in specific licenses will still
work).

QTP 9.5 has no upgrade option – one has to uninstall the previous version, and
only then perform a clean install. Considering the problems caused by the upgrade
process in previous versions, this is probably a good call by HP.

Copyright © 2008 AdvancedQTP Page 1 of 25


QuickTest Professional 9.5 Review

New Design-Time Panes

QTP 9.5 continues the theme QTP 9.0 established in putting a massive emphasis
on smoothing the user experience and reducing the click-per-action ratio. Operations
which were once buried under endless sub-menus, or had no automated interface at all,
are now placed front-and-center via the new IDE panes.
While the new panes do not deliver any new functionality per-se (aside from the
Process Guidance pane), they have the potential to dramatically change the way you
generate and maintain your code.

Available Keywords Pane

The Available Keywords pane is possibly the most useful of the new panes. The
pane shows all the available functions in the current test (either in-action or externally
added), as well as all the objects in you object repository (local and external).
The items are effectively separated into groups, so you can relatively easily sieve
the relevant item out of what could potentially be a monstrous list. Moreover, it seems
that HP really invested in the small details of the pane's operation – collapsed items
remember which of their sub-items were expanded, and the keyboard operation is superb
– allowing you to navigate collapse and expand the list via keyboard alone.

The pane serves a dual functionality – double clicking any item will open it, and
dragging the item to the main window will add it to the script in the drop position. Once
again, it's HP's attention to details which makes this feature useful.

Copyright © 2008 AdvancedQTP Page 2 of 25


QuickTest Professional 9.5 Review

Double clicking a function will not only open the hosing file in the main window,
but also focus on the exact position of the function within the file. This makes the once
painstaking task of finding function in a central external file a simple matter of clicking
the appropriate item in the pane's list (which is alphabetically sorted). The same goes for
double clicking a test object – the object repository will open with the focus and selection
on the relevant item.
The operation of dragging an item to the main window is also carefully thought
out. A function is automatically added with a proceeding comment, specifying its in-
parameter structure, while a test object is automatically added with its most common
command already specified.

In conclusion, this pane offers a strange blend of the almost useless Keyword
View to the hands-on Expert view ways of work. By visually laying out all the script
resources at your disposal, the pane makes the next scripting step easier to invoke, and
the well designed interface and functionality elevate it from a mere gimmick to a worthy
addition to QTP.

Test Flow Pane

The Test Flow pane touches a less everyday used functionality of QTP, so its
potential impact on your productivity is not as dramatic as the previously reviewed
Available Keywords pane. However, it embodies the concept of taking an existing
functionality and reviving it by making it more accessible.
The pane lays out the action call structure of the current test. It outlines the order
in which the "main" actions are called, as well as the inner-action calls between actions. It
even deals with one level of recursion between action calls (as noted by the small green
arrow).
Other than making sense of the test flow (a worthy achievement on its own), the
pane offers a central place to access and maintain the properties of the actions. You can
easily delete an action, change its properties and its action-call properties, access its
object-repository, and control the order in which it will be called within a test.
Concentrating all this highly practical features in one place saves the daunting
task of searching for a specific action-call in hundreds of code-lines or navigating through
the illogical menu path of Edit->Action->Action Properties.

Copyright © 2008 AdvancedQTP Page 3 of 25


QuickTest Professional 9.5 Review

In short, this pane is another welcomed addition to QTP; one that effectively
smoothes a once needlessly complicated task. While its actual impact is likely to be small
in daily use, it still scores high points for improving the user experience within the
limited scope of this specific niche.

Resources Pane

The Resources Pane offers a sort of a unified command center for the current
test. It offers a quick overview of all the external function files, recovery scenarios and
object repositories associated with the test; it also provides a quick way to add and
remove these resources. You can associate repositories with specific actions, add new
external library files and add new recovery scenarios.

Copyright © 2008 AdvancedQTP Page 4 of 25


QuickTest Professional 9.5 Review

Like the Test Flow pane, the Resources pane won't become part of your daily
routine, but when the time comes it will greatly improve your user experience.

Process Guidance Pane

The Process Guidance pane brings a completely new feature to QTP, which
offers organizations an effective mean for implementing best practices and distributing
just-in-time critical information to their QTP personnel.
The pane (or rather – panes) somewhat resembles MS Office on-line help. These
panes include a topic list on one side and a content area on the other (though you can
position and dock the components as you like). Clicking a topic will load its contents onto
the content area, and it is also possible to navigate via the Next and Back buttons located
at the bottom of the pane.

Copyright © 2008 AdvancedQTP Page 5 of 25


QuickTest Professional 9.5 Review

Organizations and users can add their own "process guidance packages", which
can offer unique topics and contents. For example, these might include the way to store
tests and manage code versions, how to work with custom objects in the application,
coding standards, and much more. These packages can be easily created with simple
HTML pages and a contents XML file.
The following screenshot shows the Process Guidance Management dialog which
enables one to add or remove existing custom Process Guidance packages.

QTP 9.5 comes with built-in process guidance package for keyword-driven
testing, and two BTO related packages, which could definitely help first-steppers with a
quick hint to the right direction. The help provided is concise, and by no means meant to
replace the full online help or tutorial. It does, however, offer several advantages on your
traditional help-file.
Some of these advantages include: the ability to dock the panes to the QTP IDE,
thus making it a much more accessible resource; embedding links which open QTP sub-
windows and menus (e.g. clicking the words "Object Repository" can actually open the
OR window); and finally, making some topics appear only when relevant (e.g. when
working on an external library file), exercising context sensitivity.
It remains an open issue whether the Process Guidance pane will be incorporated
in work methods and processes in large organizations, whom are the most likely to gain
from this feature, and how. While it does offer real added value for first-steppers, its lack
of integration with the full VBScript and QTP reference help make it redundant after a
short while.

Copyright © 2008 AdvancedQTP Page 6 of 25


QuickTest Professional 9.5 Review

Miscellaneous Design-Time Improvements

Other than the new panes, QTP 9.5 comes with other design-time
improvements which are also supposed to offer an improved user-experience. Some of
them indeed fulfill this promise, while others provide mere eye-candy which quickly
becomes tiresome.
The first improvement is the improved start page. It offers several improvements
over the previous minimal pop-up screen – shortcuts for creating new entities, viewing
loaded process guidance packages, and quick access to recently loaded files. It also
integrates a short explanation of the version's new features. However, while the new
start page does include some new features, and is undoubtedly more aesthetic than its
predecessor, it lacks any real added value.

Naturally, the bulk of QTP work tends to be on existing tests and components
rather than new ones, and this renders the top shortcuts quite useless. Process Guidance
packages will be automatically loaded together with the IDE layout, so listing them also
brings little added value. Listing the "What's New" features is nice for the first couple of
times, but becomes quickly redundant. And so we are left with the only feature which
remains useful over time – the recent files list. Considering the fact that the recent files
list under the File menu shows more items, even this feature turns out to be a missed
opportunity.
In conclusion, the start page – like its predecessor – will most surely be set not to
appear on startup. The much more useful feature of automatically opening the recent file
is yet to be included.
In contrast to the start page, a very valuable (though tiny) new feature is the
relative path suggestion. Whenever you include a resource (e.g. an external library,

Copyright © 2008 AdvancedQTP Page 7 of 25


QuickTest Professional 9.5 Review

object repository, etc.) a pop-up will appear, suggesting to add the relevant path to
QTP's folders list, and to convert that path to a relative one, as shown in the following
screenshot:

This feature achieves two important goals. First, it promotes a little known tool of
QTP (the folders list), as well as the overlooked option to save paths as relative ones.
This option is seldom used, until the need to relocate the tests arises and one finds out -
belatedly - that dozens of specific paths in each and every test must be either converted
or updated.
One major flaw with this otherwise important feature is the implementation of
the "Do not show this message again" option. QTP doesn't remember if you pressed Yes
or No before checking the "do not bug me again" box, so you basically can't choose
"Always Yes", but only "Always No". In short, you either have to constantly endure the
pop-up, or to give up the feature altogether.
Other small changes include automatically creating new actions as reusable, and
the ability to set the mechanism for text recognition (windows OCR vs. QTP's API).

The Object Repository

The first difference noticed when the Local object repository or the Repository
manager are opened is the new "Checkpoint and Output Objects" branch in the treeview
on the left.

Copyright © 2008 AdvancedQTP Page 8 of 25


QuickTest Professional 9.5 Review

Copyright © 2008 AdvancedQTP Page 9 of 25


QuickTest Professional 9.5 Review

What Is Still Missing

At the end of the day, QTP 9.5 brings several improvements to the user's work
process and overall productivity. Having said that, it still leaves out some much needed
features and fixes to be dealt with in future releases.
First, the additional panes and IDE improvements cannot compensate for QTP's
very poor editor and virtually non-existent intellisense. As long as there's no real auto-
complete, debugging and metadata support, as well as object inner properties and
method information (such as if private/public, which one finds out belatedly with a
"method or property is not supported" error), QTP will lag behind many competing
editors. As some of these competing editors are entirely free, or cost as low as 20$, it
seems unacceptable the QTP will remain in the technological era equivalent to the dark-
ages. As to myself, I will continue writing my scripts in Test Design Studio.
Other well known historical problems that are still with us include: the inability
to call actions at runtime (i.e. without adding them to the test at design time), a hanging
QTP on many occasions, the DataTable mechanism, which is still one of the worst ways
to pass data between actions, and the fact that the QTP native log evaporates if QTP
crashes in the midst of a run session.
I hope HP will address some of these issues in the next major release. Do not get
me wrong, the new panes are great, but they do not do much good when QTP crashes in
the middle of a 24 hours test-run.

Run Scripts in Maintenance Mode

As QuickTest runs in Maintenance Run Mode, it identifies discrepancies between


the objects in the repository and those in your application, and then offers solutions for
updating your objects and steps in real time.
In Maintenance Run Mode, the run pauses each time an object is not found. You
can point to the required object in your application, and QuickTest will recommend a
solution for updating your object repository and test step to match the selected object.
Alternatively, you can select to add comments to a problematic step and address it
manually at a later time.

Copyright © 2008 AdvancedQTP Page 10 of 25


QuickTest Professional 9.5 Review

To all the former veteran WinRunner users, this feature will probably remind you
of the object pointer during run-time.

If an object changed in your AUT, when you are running in maintenance mode
the following dialog will appear immediately after a mismatch found between the OR
and the AUT:

Copyright © 2008 AdvancedQTP Page 11 of 25


QuickTest Professional 9.5 Review

If you select to point the object, a new "suggestion" and failure details will be
displayed:

A short summary will be displayed when the test finishes:

Copyright © 2008 AdvancedQTP Page 12 of 25


QuickTest Professional 9.5 Review

And a detailed report summary after the test ends:

In case you select to "Add comments" and you will fix your repository manually and add
your own comments.

And here we can see the comments inserted when choosing to handle

Copyright © 2008 AdvancedQTP Page 13 of 25


QuickTest Professional 9.5 Review

discrepancies manually afterwards:

Copyright © 2008 AdvancedQTP Page 14 of 25


QuickTest Professional 9.5 Review

Checkpoints

After the improvements we have seen, let us see what is new with regard to checkpoints.

Checkpoints Management

One of the big improvements of this version is the checkpoint management. As


far as I know, many people decided not to use checkpoints because you cannot copy
them to another action or move them to a function library; they are "hidden" from the
expert user.
Now, if you manage a Shared OR, you can insert a checkpoint in any action, or in
an associated library file.

Another reason is when working with a type of checkpoint for which the results
are always unexpected, such as the bitmap checkpoint. The bitmap checkpoint is one of
the checkpoints that in my whole career I never implemented. Of course I experimented
with it a lot in different applications, but every time a little meaningless pixel difference
caused the test to fail, requiring a later human analysis to find out that something very
small, a single pixel was the difference.

As a possible remedy to the problem raised above, QTP 9.5 offers a tolerance

Copyright © 2008 AdvancedQTP Page 15 of 25


QuickTest Professional 9.5 Review

parameter for pixels and for RGB. Please see the results of a test I performed below.

Browser("AQTP").Page("AQTP").Image("logo").Check CheckPoint("logo")

Changing the Colors


In this test, I am checking the logo of the www.advancedqtp.com site without
tolerance at all. The first test passed with no change in the bitmap. Now, I will change the
image - first the colors:

Then, I run again the test and unsurprisingly, it failed.

Copyright © 2008 AdvancedQTP Page 16 of 25


QuickTest Professional 9.5 Review

Since the colors are different, I will configure my checkpoint with 100% RGB tolerance.

The test passed, so the conclusion is that this feature can solve many problems
when testing bitmaps on different color quality configurations (32bit, 16bit). Sometimes
we do not want to test the colors, just to test the content and shapes, so this can be very
useful.
What is interesting here is that even though I changed all the image colors, a
tolerance of below 51% failed the test and 51% and above, passed the test. I was
expecting that 99% will fail my test. Although I can't prove it, perhaps the color
algorithm still "sees" similar colors.

Copyright © 2008 AdvancedQTP Page 17 of 25


QuickTest Professional 9.5 Review

Changing the Image


The logo has 970 pixels long and 220 pixels width (970x220). I had drawn a little
black square of 10x10 pixels on the picture. Simple math will tell us that the black square
is less than 1% (0.04%) of the whole picture area.

With no pixel or RGB tolerance the test failed.

Copyright © 2008 AdvancedQTP Page 18 of 25


QuickTest Professional 9.5 Review

With Pixel tolerance of 5% and no RGB tolerance the test also failed.

Only above of 50% tolerance the test was passed. An interesting point is that the
test also passed with 100% RGB tolerance and 0% pixel tolerance. The combination of 3%
Pixel tolerance and 3% RGB tolerance also passed the test.
When using pixels instead of percentage, The black square area is 100 pixels. RGB
tolerance of 3% and pixel tolerance of 500 pixels still failed my test. Only by increasing
the RGB tolerance to 10%, my checkpoint passed.
My conclusions are :
There is a major improvement in the bitmap checkpoints feature.
The tolerance feature is something the user has to "fiddle" with.
The comparison analysis report is still poor. I would prefer the WinRunner style
that displayed a third window, and pointed to the differences. In large bitmaps it
is very hard to notice the differences.

Copyright © 2008 AdvancedQTP Page 19 of 25


QuickTest Professional 9.5 Review

Web Add-In Extensibility

QTP 9.5 enables you to extend the support given for Web objects by means of
its Web Add-In Extensibility feature. This feature is very important when the application
under test (AUT) includes unsupported third-party or custom Web controls. In addition,
new technologies such as AJAX are supported with the introduction of this feature. The
feature is well documented, with easy to follow step-by-step examples of how to
implement such an extension.
To be able to use this feature the automation developer must possess knowledge
of JavaScript. It is assumed that the implementation of a Web extension should be much
easier to master in comparison to the implementation that entails the .NET Add-In
Extensibility feature (see below a review of this feature, done for the purpose of
comparison), which in some cases requires knowledge of C# or VB .NET.
Implementing a Web extension requires the automation developer to configure 2
XML files, write some code in JavaScript and then deploy these files to the required
folders. The 2 XML files are <Package Name>TestObjects.xml and <Package Name>.xml. The
*.js (JavaScript) file can have any name – it is referenced within the <Package
Name>.xml. Resources, such as an icon representing the custom control, can be also
defined to appear in the Object Repository, Keyword View and Report. An icon as such
must be placed in a special Res folder as follows: <QuickTest Installation
Folder>\dat\Extensibility\Web\Toolkits\<Package Name>\Res\ and must be referenced in
the <Package Name>TestObjects.xml file in the IconInfo element.
The first XML file, <Package Name>TestObjects.xml, should be placed under:
<QuickTest Installation Folder>\dat\Extensibility\Web\. This file defines whether to load
the extension by default, under which Add-In it should appear in the Add-In Manager
Dialog as a package (see below Figure 1.), and the Class Info that includes the base class
the custom object maps to, the operations (methods) and properties supported by the
custom object. These methods and properties are later used by QTP to identify the object
and to have access to the object methods during both record and run-time. Of course,
they must be implemented in a *.js file, as explained below.
As its name suggests, it is possible to define within this file more than a single
Class Info element. It contains the definitions for all the objects logically grouped under a
package. An example of this can be found in the ASPAjaxTestObjects.xml file located
therein.

Copyright © 2008 AdvancedQTP Page 20 of 25


QuickTest Professional 9.5 Review

Figure 1. Add-in Manager with custom WebExtSample package.

The second XML file, <Package Name>.xml, should be placed under:


<QuickTest Installation Folder>\dat\Extensibility\Web\Toolkits\<Package Name>\.
This file defines two vital elements:
1) Identification: It is the method to detect the existence of the required custom
object (can either direct to a JS function of be defined inline in the XML). For
example, you can define the mandatory properties that the QTP object
identification mechanism needs to detect the existence of the required custom
object during record and run-time; for example: tagName and className).
2) Settings: The file that contains the implementation of the operations defined in
the <Package Name>TestObjects.xml file mentioned above.

Copyright © 2008 AdvancedQTP Page 21 of 25


QuickTest Professional 9.5 Review

For example, the definition of the Book control from the extensibility samples:

<?xml version="1.0" encoding="UTF-8"?>


<Controls>
<Control TestObjectClass="WebExtBook">
<Identification>
<Conditions type="IdentifyIfPropMatch" logic="and">
<Condition prop_name="tagName"
expected_value="TABLE"/>
<Condition prop_name="className"
expected_value="Book"/>
</Conditions>
</Identification>
<Settings>
<Variable name="default_imp_file" value="WebExtBook.js"/>
</Settings>
</Control>
</Controls>

If you fail to deploy the implementation, or your implementation is missing


something, you might get an error like the one in Figure 1.

Figure 2. Run-time error due to extensibility implementation fault.


This error, as is usually the case with WSH, VBScript and QTP, does not provide
exact information as to the source of the problem. Hence, such a situation requires the
automation developer to know exactly what the test was trying to do at the exact point in
which the error occurred, what is covered by the implementation (or if deployment took
place at all) and, hence, he or she must find the root cause independently.
Similarly to the standard procedure with the other Add-Ins, closing and
reopening QTP is required to test the extensibility implementation. I personally would
love it if QTP was able to load an Add-In or one of its extensions dynamically during
run-time, but I guess for the time being this is a small price to pay for having the ability
to support controls that QTP does not support with the out-of-the-box add-ins.

Copyright © 2008 AdvancedQTP Page 22 of 25


QuickTest Professional 9.5 Review

.NET Add-In Extensibility

Though .NET Add-In Extensibility is not an entirely new feature (released with
QTP 8.2), I decided to put forth a brief review of its main strengths and weaknesses. QTP
9.5 enables you to extend the support given for .NET objects by means of its .NET Add-
In Extensibility feature. This feature is very important when the application under test
(AUT) includes unsupported third-party or custom .NET controls. The feature is well
documented, with easy to follow step-by-step examples of how to implement such an
extension.
When the control is relatively simple and well documented, or when it maps well
to an existing class and it is required to replace or add Test Record definitions or Test
Run methods, then it is possible to build the extension using a Control Definition XML
and, optionally, extend the functionality (Intellisense, icons, etc.) with a Test Object
configuration file. This method does not require programming knowledge. However, it
does require a very good understanding of the underlying structure of classes and
interfaces (object model), and the workings of QTP.
When this is not the situation with the controls, the automation developer must
possess knowledge of C# or VB .NET to be able to exploit this feature.
It is a pity, though, that Visual Studio .NET or Visual Studio .NET 2005 are
prerequisites for installing this feature. Although the implementation of a .NET
extension doesn't seem too complicated, at least for experienced developers, the method
entails the creation of a new project in Visual Studio of type QuickTest CustomServer by
means of a proprietary project template, guided by a wizard. On the other hand, the full
fledged resulting class and configuration file are exemplified in the feature
documentation, so it would be interesting to try to write the code manually with another
.NET development environment (such as SharpDevelop) to put the seeming ease of the
implementation to test. It is worth noting in this context that the Java Add-In
Extensibility feature uses a similar implementation scheme on the Eclipse IDE. However,
this platform is freely distributed by IBM, in contrast to Visual Studio. The main issue
raised here is that organizations, willing to use open source tools rather than Microsoft
tools, are thus discriminated in comparison to others undertaking the opposite policy.

Multiple Browser Tabs

QTP 9.5 attempts to keep-up with the latest technology developments, and
similarly to the introduction of Web extensibility and AJAX support, it finally provides
support for multiple Browser tabs, a feature that has become a part of our daily lives for
quite long with the advent of the precursors of IE 7 Mozilla Firefox and Opera, to name
just two of the main players. For the automation developer this is of great added value
since Web applications need to be tested on the new Browsers supporting multiple tabs,
which would eventually be used by the end users. The implementation is very easy and

Copyright © 2008 AdvancedQTP Page 23 of 25


QuickTest Professional 9.5 Review

seamless; each tab is recorded as an independent Browser object, so the rest remains the
same with regard to synchronization and other crucial automation related topics. QTP
9.5 allegedly also supports Mozilla FireFox 3 Grand Paradiso, which is currently in its
alpha stage. It would be of great value to anyone whose application requirements
mandate supporting this platform along Internet Explorer, Netscape and others.

Support for Eclipse

QTP 9.5 introduces the solution for an old headache from which automation
developers have suffered for years: automating Eclipse based applications and plug-ins.
After loading the Java Add-In, as required, I tried to navigate through the Eclipse IDE
GUI and was satisfied to find out that QTP really succeeds to identify the objects therein,
including JavaTree and JavaTab which implements an MDI view (see below screenshot
of recorded code and active screen), which have been very problematic ever since the
times of our old and "beloved" companion (though obsolete now) WinRunner and to the
new era of QTP with its support of the object model and COM technology.

Figure 3. Eclipse support (Navigation Tree).

Copyright © 2008 AdvancedQTP Page 24 of 25


QuickTest Professional 9.5 Review

Figure 4. Eclipse support (Tabs and MDI).

Copyright © 2008 AdvancedQTP Page 25 of 25

You might also like