You are on page 1of 5

QTP

Features of QTP:
0· Ease of use.
0· Simple interface.
0· Presents the test case as a business workflow to the tester (simpler to understand).
0· Uses a real programming language (Microsoft’s VBScript) with numerous resources available.

0· QuickTest Pro is significantly easier for a non-technical person to adapt to and create working
test cases, compared to WinRunner.
0· Data table integration better and easier to use than WinRunner.
0· Test Run Iterations/Data driving a test is easier and better implement with QuickTest.
0· Parameterization easier than WinRunner.
0· Can enhance existing QuickTest scripts without the “Application Under Test” being available;
by using the ActiveScreen.
0· Can create and implement the Microsoft Object Model (Outlook objects, ADO objects,
FileSystem objects, supports DOM, WSH, etc.).
0· Better object identification mechanism.
0· Numerous existing functions available for implementation – both from within QuickTest
Pro and VBScript.
0· QTP supports .NET development environment
0· XML support
0· The Test Report is more robust in QuickTest compared to WinRunner.
0· Integrates with TestDirector and WinRunner (can kick off WinRunner scripts from
QuickTest).

----------------------------------------------------------------------------------------------------------------
----------------------------

How can we use the data table to provide input data to an application?
Use the DataTable.Value method to access data from the data table and input it into the
application
For data in theaGlobal
1. Open datasheet:
new script.
2. In column A of the Global datasheet, enter the data in
three rows.
3. Go to www.google.com.
4. Begin recording.
5. Type a value into the Google search field.
6. Stop recording.
7. Go to the Expert view. Modify the script so it look like
this:
rc = DataTable.Value ("A", dtGlobalSheet)
msgbox rc
Browser("Google").Page("Google").WebEdit("q").Set rc
8. To run all rows in the global data table, go to Test ->; Test Settings -> Run tab, and select "Run on all
rows."
For data in the Local datasheet: 1.
Start a new script.
2. In column A of the Action1 datasheet, enter the data in three rows: 3. Go to
www.google .com.
4. Begin recording.
5. Type a value into the Google search field.
6. Stop recording.
7. Go to the Expert view. Modify the script so it look like this: rc
= DataTable.Value ("A", dtLocalSheet)
msgbox rc
Browser("Google").Page("Google").WebEdit("q").Set rc
8. To run all rows:

1. Right-click on the Action name in the Tree View.


2. Go to Action Properites -> Run tab, and select "Run all rows."

Similarly, How can we use the data table to get output data from an application?
Create an Output Value. The text will be placed in the datatable and can be accessed as needed.

1. Once you see the text you want to retrieve, start recording.
2. From the Insert menu, select Output Value, then Text Output Value.
3. Click on the desired text. The "Text Output Value Properties" window will appear. 4. In the
window you can verify or set the Before and After text settings.
5. By default the retrieved value will be added to the Global sheet. You can modify the settings by
selecting Output Text in the combobox, then clicking Modify.
6. Once satisfied, click OK.
An Output statement will be entered into the script.
Example:
Browser("Browser").Page("Page").Output CheckPoint("Text")
msgbox DataTable.Value("PageOutput_Text_out", dtGlobalSheet)
In addition, a column (in the example, PageOutput_Text_out) will be inserted into the
datatable(Remember in the runtime datatable), with the output text.
OR Another method to retrieve data during run time is to do just the opposite of what we did
above in the first question above.
DataTable.Value(ParameterID [, SheetID])=NewValue
Note:
The value property is the default property for the DataTable object. As the default property
you do not need to explicitly use .Value.
DataTable(ParameterID [, SheetID]) = NewValue
Example:
' Add data to the current row of the Global sheet
DataTable("VarName", dtGlobalSheet) = "new value" ' Using DataTable by itself
DataTable.Value("VarName2", dtGlobalSheet) = "new value2" ' Using .Value
' Add data to the current row of the Local sheet
DataTable("VarName", dtLocalSheet) = "new value" ' Using DataTable by itself
DataTable.Value("VarName2", dtLocalSheet) = "new value2" ' Using .Value

Overview
HP QuickTest Professional is automated testing software designed for testing various
software applications and environments. It performs functional and regression testing through a user
interface such as a native GUI or web interface.It works by identifying the
objects in the application user interface or a web page and performing desired operations (such as
mouse clicks or keyboard events); it can also capture object properties like name or
handler ID. HP QuickTest Professional uses a VBScript scripting language to specify the test procedure
and to manipulate the objects and controls of the application under test. To
perform more sophisticated actions, users may need to manipulate the underlying VBScript. Although
HP QuickTest Professional is usually used for "UI Based" Test Case Automation, it
also can automate some "Non-UI" based Test Cases such as file system operations and database
testing.
Verification
Checkpoints verify that an application under test functions as expected. Users can add a
checkpoint to check if a particular object, text or a bitmap is present in the automation run. Checkpoints
verify that during the course of test execution, the actual application behavior
or state is consistent with the expected application behavior or state.
HP QuickTest Professional offers 9 types of checkpoints, 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. The types
of checkpoints are standard, image, table, page, text, text area, bitmap, database,
accessibility and XML checkpoints. Users can also create user-defined checkpoints.
Exception handling
HP QuickTest Professional manages exception handling using recovery scenarios; the goal is to
continue running tests if an unexpected failure occurs. For example, if an application
crashes and a message dialog appears, HP QuickTest Professional can be instructed to attempt to
restart the application and continue with the rest of the test cases from that
point. Because HP QuickTest Professional hooks into the memory space of the applications
being tested, some exceptions may cause HP QuickTest Professional to
terminate and be unrecoverable.

Data-driven testing
HP QuickTest Professional supports 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 HP QuickTest Professional. HP QuickTest Professional
has two types of data tables: the Global data sheet and Action (local) data sheets. The test steps can
read data from these data tables in order to drive variable data into the
application under test, and verify the expected result.

Automating custom and complex UI objects


HP QuickTest Professional may not recognize customized user interface objects and other
complex objects. Users can define these types of objects as virtual objects. HP QuickTest
Professional does not support virtual objects for analog recording or recording in low-level
mode.

Extensibility
HP QuickTest Professional can be extended with separate add-ins for a number of
development environments that are not supported out-of-the-box. HP QuickTest Professional add-ins
include support for Web, .NET, Java, and Delphi. [16] HP QuickTest Professional and the
HP QuickTest Professional add-ins are packaged together in HP Functional Testing software.

Test results
At the end of a test, HP QuickTest Professional generates a test result. Using XML schema,
the test result indicates whether a test passed or failed, shows error messages, and may provide
supporting information that allows users to determine the underlying cause of a
failure. Release 10 lets users export HP QuickTest Professional test results into HTML, Microsoft Word
or PDF report formats. Reports can include images and screen shots for use
in reproducing errors.

User interface
HP QuickTest Professional provides two views--and ways to modify-- a test script: Keyword View and
Expert View. These views enable HP QuickTest Professional to act as an Integrated
Development Environment (IDE) for the test, and HP QuickTest Professional includes many standard
IDE features, such as breakpoints to pause a test at predetermined places.
Keyword view
Keyword View lets users create and view the steps of a test in a modular, table format. Each
row in the table represents a step that can be modified. The Keyword View can also contain any of the
following columns: Item, Operation, Value, Assignment, Comment, and
Documentation. For every step in the Keyword View, HP QuickTest Professional displays a
corresponding line of script based on the row and column value. Users can add, delete or
modify steps at any point in the test.
In Keyword View, users can also view properties for items such as checkpoints, output
values, and actions, use conditional and loop statements, and insert breakpoints to assist in debugging
a test.
VBScript code in Expert View
In Expert View, HP QuickTest Professional lets users display and edit a test's source code using
VBScript. Designed for more advanced users, users can edit all test actions except for
the root Global action, and changes are synchronized with the Keyword View.

Languages
HP QuickTest Professional 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 a
debugger, but the functionality is more limited when compared with testing tools
that integrate a full-featured IDE, such as those provided with VBA, Java, or VB.NET.

Drawbacks
HP QuickTest Professional cannot be used by a plug-in in non-Windows environments. It
fetches objects like ActiveX from the Windows environment but not from other operating systems.
QTP cannot be used to test with all browser types and versions

Supported Technologies
ᄋ Web ᄋ SAP
ᄋ Java(Core and Advanced) ᄋ Oracle
ᄋ .Net ᄋ Siebel
ᄋ WPF ᄋ PeopleSoft
ᄋ Delphi ᄋ Web Services
ᄋ Power Builder ᄋ Windows Mobile
ᄋ Stingray 1 ᄋ Visual Edge
ᄋ Terminal Emulator ᄋ SOAP
ᄋ Flex ᄋ Mainframe terminal emulators

Versions
1. 11.0 - Released in 2010 7. 8.0 - Released in 2004
2. 10.0 - Released in 2009 8. 7.0 - Never released.
3. 9.5 - Released in 2007 9. 6.5 - Released in 2003
4. 9.2 - Released in 2007 10. 6.0 - Released in 2002
5. 9.0 - Released in 2006 11. 5.5 - First release. Released in
6. 8.2 - Released in 2005 2001

You might also like