HP QuickTest Professional
From Wikipedia, the free encyclopedia
| This article needs references that appear in reliable third-party publications. Primary sources or sources affiliated with the subject are generally not sufficient for a Wikipedia article. Please add more appropriate citations from reliable sources. (August 2007) |
| This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. Please improve this article by introducing more precise citations where appropriate. (August 2008) |
| This article is written like an advertisement. Please help rewrite this article from a neutral point of view. For blatant advertising that would require a fundamental rewrite to become encyclopedic, use {{db-spam}} to mark for speedy deletion. (August 2008) |
| Developer(s) | HP/Mercury Interactive |
|---|---|
| Stable release | 10.0 |
| Operating system | Microsoft Windows |
| Development status | Active |
| Type | test automation tools |
| License | Proprietary |
| Website | HP QuickTest Pro |
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 and desktop 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.
As part of a functional test suite, it works together with Mercury Interactive WinRunner and HP Quality Center and supports enterprise Quality Assurance.
Contents |
[edit] Overview
QTP is UI automation software designed for testing Web-based and Windows based applications running on Microsoft Windows. Like other test automation tools, 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 or handler ID etc. To perform these actions, 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. To perform sophisticated actions, users may need to manipulate the underlying VBScript.
Though QTP is usually used for "UI Based" Test Case Automation, it can automate some "Non-UI" based Test Cases. (e.g. API (Certification testing), Database Testing, etc.)
Some features of QTP are:
[edit] Plug-ins
QTP offers plug-ins for specific application technologies, such as ActiveX controls, web applications, VisualBasic, Microsoft .NET and others. A limited set of basic plug-ins comes by default. Users need to purchase licenses for others at an additional cost.
[edit] License models
QTP comes with a 14-day demo license, and supports a node-locked seat license, as well as floating or concurrent licenses.
[edit] Record and playback
Initial development of automated tests with QTP is usually done by record-and-playback. A user's actions are recorded and transposed into comprehensible actions using VBScript. Once recorded, the scripts are editable in either Keyword View or Expert View.
To execute, users select the playback button, which re-executes the commands against the application under test. In real world usage, simply recording and playing-back actions is generally not valuable, as it simply repeats a test already executed and may no longer be valid (because the record now exists in the system, for example).
This record/playback behavior is not unique to QTP, but is shared by comparable automated functional testing tools, such as IBM Rational Functional Tester, Compuware TestPartner, and Borland SilkTest.
[edit] Verification
Checkpoints are a feature used for verifying that the application under test functions as expected. One can add a checkpoint to check if a particular object, text or a bitmap is present in the automation run. 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.
There are 10 types of checkpoints available in QTP, enabling users to verify various aspects of an application under test, such as: the properties of an object, data within a table, records within a database, a bitmap image, or the text on an application screen. Users can also create user-defined checkpoints.
[edit] Exception handling
Recovery is the name for exception handling in QTP, with the goal of enabling the tests to continue to run 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. Because QTP hooks into the memory space of the applications being tested, some exceptions may cause QTP to terminate, and may be unrecoverable.
[edit] Data-driven testing
QTP has features to enable users to perform data-driven testing. For example, data can be output to a data table for reuse elsewhere. Data-driven testing 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 test steps read data from these data tables in order to (for example) drive variable data into the application under test, and verify the expected result.
[edit] Automating custom and complex UI objects
Customized user interface objects and other complex objects may not be recognized properly by QTP. QTP offers a Virtual Object concept to enable users to add some degree of support for these objects. 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.
[edit] 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 may provide supporting information that allows users to determine the underlying cause of a failure. Frequently, however, users may need to re-execute the test case and observe the failure directly.
[edit] 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 QuickTest Professional window.
[edit] 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, parameters, and comments. This mode is useful for the beginners. 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 checkpoints from the keyword view. Users without technical knowledge may be able to understand the Keyword View, but more experienced users and users needing to perform more complicated actions may need to switch to Expert View.
[edit] Expert view
In Expert View, QTP allows display and editing of the test's source code using VBScript. All test actions can be edited here except for the root Global action. Expert View acts as an IDE for the test. It includes many standard IDE features, such as breakpoints.
[edit] Languages
QTP uses VBScript as its scripting language. VBScript supports classes but not polymorphism and inheritance. Compared with Visual Basic for Applications (VBA), VBScript lacks the ability to use some Visual Basic keywords, does not come with an integrated debugger, lacks an event handler, and does not have a forms editor. HP has added some of these features to QTP, such as a debugger, but QTP's functionality is more limited in these areas compared with testing tools that integrate a full-featured IDE, such as those provided with VBA, Java, or VB.NET.
[edit] Drawbacks
QTP is not supported by non-Windows based applications. Neither can it be used by a plug-in in other environments. It fetches objects like ActiveX from the Windows environment which is not possible in any other OS. It also cannot be used via Remote Desktop Connection due to licensing issues.[citation needed]

