UFT One
Developer(s) | HP/Mercury Interactive |
---|---|
Stable release | 9.2
|
Operating system | Microsoft Windows |
Type | test automation tools |
License | Proprietary |
Website | http://mercury.com |
Quick Test Professional (QTP) is an automated functional Graphical User Interface (GUI) testing tool created by the HP subsidiary Mercury Interactive that allows the automation of user actions on a web or client based computer application. It is primarily used for functional regression test automation. QTP uses a scripting language built on top of VBScript to specify the test procedure, and to manipulate the objects and controls of the application under test.
Overview
QTP is a UI automation framework designed mainly for Windows and Web-based applications. It works by identifying the objects in the application UI or a web page and performing the desired operations on them (like mouse clicks or keyboard events); it can also be used to capture object properties like name, handler ID etc.
Some of the key features of QTP are:
Plug-ins
Plug-ins are used to make recording more acceptable to a specific application, we use web plug-ins to automate test cases with respect to web applications. QTP has default plug-ins for ActiveX controls, web applications and VB objects. Plug-ins for other objects, such as Microsoft .NET objects, are also available. Multimedia plug-ins are also available. In general, each QTP plug-in is available at an additional cost.
Record and Playback
Initial development of automated tests with QTP is usually done by record-and-playback. A user's actions are captured via Microsoft's Component Object Model (COM). These are recorded into Actions, a kind of subroutine, as VBScript commands. All manipulated objects that QTP recognizes are also added to the object repository. Once recorded, the scripts are editable in either Keyword View or Expert View.
After clicking on the playback button all these actions will be played back. During playback, QTP attempts to identify and manipulate the same objects, again using COM.
Active Screen
QTP captures the screen of the application and saves along with the script. The active screen section highlights the objects in the active screen as the user navigates through the script so the user knows what object he/she will be performing the action upon.
Active screen is also helpful in creating checkpoints. A right-click on an object displayed in the active screen produces a drop-down menu, which includes a list of checkpoints that can be placed at the current cursor position in the script.
Checkpoints
Checkpoints are a feature used for verifying the application under test. One can add a check point to check if a particular object, text or a bitmap is present in the automaton run.
In short, checkpoints are used to verify that during the course of test execution, the actual application behavior or state is consistent with the expected application behavior or state.
Available checkpoints in QTP include image checkpoint, table checkpoint, and page checkpoint. The VBScript Reporter.ReportEvent function also produces output very similar to that of a checkpoint, allowing the creation of custom checkpoints.
Recovery
Recovery is the name for exception handling in QTP, with the goal of enabling the tests to continue if an unexpected failure occurs. For instance if an application crash occurs and a message dialog appears, QTP can be instructed to attempt to restart the application and continue with the rest of the test cases from there.
Output Value
This feature is used to output values to the data table when a particular event is made. For instance if one wants to store the default value of the text box before the start of the test one can use this and store in a data table when an event is made on it.
Data Table
The data table is a table primarily used to implement data-driven testing. It is implemented as a Microsoft Excel workbook that can be accessed from within QTP. There are two types of Data Tables available in QTP: the Global data sheet and the local data sheets. The Global data sheet is a single sheet which is accessible from every Action in a test. By default, each row of this sheet specifies the values to be used in an iteration of the entire test.
There is also one local data sheet associated with each Action. As the Global data sheet specifies iterations of an entire test, these sheets are often used to set up iterations of a single Action. The data in these sheets can only be accessed from their associated Action. While it is possible to access a different Action's local data sheet, it cannot be done from the Object Repository or from inside a checkpoint.
Virtual Objects
Complex objects may not be recognized properly by QTP. The Virtual Object concept was implemented to enable users to add some degree of support for these objects. If an object is not recorded out-of-the-box, an experienced user may be able to define that object as a personal virtual object and build a virtual object repository. Assuming that the required information can be extracted from the object, this allows the users to successfully record and playback against that object. In practice, this is not always possible.
Transactions
This feature can be used to calculate the time required to run a particular test or particular steps in the tests. Transactions are most often used in automated software performance testing, so they are infrequently used in QTP.
Results
QTP generates the result file for the test cases at the end of test in the form of XML tree. The result file provides detail regarding PASS and FAILS counts, error messages, and potentially supporting information that allows users to determine the underlying cause of a failure.
User Interface
QuickTest provides two main views of a script: Keyword View and Expert View. They are selected from tabs at the bottom of the QTP window.
Keyword View
Keyword View is QTP's default test procedure interface. It displays the automation steps of a test procedure as a descriptive tree of Actions and functions. The tree contains columns listing the Action or function name, any parameters, and comments. This mode is most useful for the beginners in operating with the tool. This view allows the user to select the objects either from the application or from the Object Repository and the user can select the methods to be performed on those objects. The script is automatically generated. Users can also set check points from keyword view.
Expert View
In Expert View, QTP allows display and editing of the a test's source code. All test actions can be edited here except for the root Global action. Expert View acts as an IDE for the test. It includes most standard IDE features, such as breakpoints.
This view is most suitable for the advanced users, enabling them to customize the test, such as by writing user-defined functions.
See also
External links
HP Functional Testing Software Website
QTP Google group
Discussion forums
QTP Blog
Advanced QTP
QTP Advanced programming
QTP Tutorials