Getting started with QTP
QTP is an acronym for QuickTest Professional, an automated testing tool originally developed by Mercury Interactive, who were acquired by HP in 2006. The tool is primarily designed for the automation of functional and/or regression testing, although it can be used in any scenario where GUI automation is required. QTP works against a variety of Windows operating systems, and can interact with a variety of Windows and Web based applications.
QTP has two operating modes, Record/Playback and Expert Mode. In the first, the user records the actions the browser is to repeat. In the second, the user defines the process start to finish directly in code. The first method is very limited in terms of producing complex automation scripts, so the second method is preferred.
QTP can operate against multiple browsers including Internet Explorer, Chrome, Firefox and Safari.
As of version 11.5, QTP was supplied packaged with HP's ServiceTest API to form Unified Functional Tester (UFT).
QTP's main scripting language is
VBScript coupled with an object repository to identify the GUI artifacts with which it interacts.
VBScript as its programming language. Therefore a Hello World example can be given in pure VBScript:
Executing this script (by pressing F5 or clicking the Play button on the taskbar) will produce a message box with the text "Hello World!" in it.
Running the installer will set up the application along with any and all available add-ons to enable additional functionality (for example, the Web add-on is required in order to allow QTP to control browser objects, the Terminal add-on allows it to control terminal emulator applications, the Java application allows it to control Java applications and so on).
It also lets the user specify the License setup from two options - Single Seat or Concurrent.
Single Seat is used where there is only a single licence for a single user.
Multiple users/licenses can be set up as Concurrent, where a central license server is configured to manage the number of users utilising the system at the same time. The number of users at any given time cannot exceed the number of available licenses.