You can retrieve values from your application at run time and store them in the Data Table as output values.
Table of Contents
- QTP Introduction
- Manual Testing Disadvantages
- Advantages of QTP
- Add-In Manager in QTP
- Testing Process in QTP
- Components of QTP
- Recording QTP Scripts
- Recording Modes
- QTP Script View
- Object Identification
- Object Repository
- Object Spy
- Actions in QTP
- Checkpoints
- Parameterizing
- Working with Data Table
- Environment Variables
- Virtual Objects
- Output Values
- Running QTP Test Scripts
- Recovery Scenario
- Sample Scripts
- Certification Questions
Wednesday, October 13, 2010
Checkpoints
A checkpoint compares the value of an element captured, when the object was saved in the object repository, with the value of the same element captured during the run session.
Tuesday, October 12, 2010
Recording Modes of QTP
Recording Modes in QTP
- Normal Recording: Records the objects and the operations performed on them. (default mode)
- Analog Recording: Records the exact mouse and keyboard operations you perform in relation to either screen or the application window. In this recording mode, Quick Test records and tracks every movement of the mouse as you drag the mouse around a screen or window.
This mode is useful for recording operations that cannot be recorded at the level of an object, for example, recording a signature produced by dragging the mouse. - Low-Level Recording: Records on any object in your application, whether or not Quick Test recognizes the specific object or specific operation
Both Analog & Low-Level Recording requires more disk space
Guidelines for Analog and Low Level Recording
- Use analog recording or low-level recording only when normal recording mode does not accurately record your operation.
- Analog recording and low-level recording require more disk space than normal recording mode.
- You can switch to either Analog Recording or Low Level Recording in the middle of a recording session for specific steps. After you record the necessary steps using analog recording or low-level recording, you can return to normal recording mode for the remainder of your recording session.
| Normal Recording | Analog Recording | Low Level Recording |
| Records Objects Information based on Test Object Model | Records Mouse Movements respect to window or screen | Records All Objects as windows or win objects |
| Records Keyboard Inputs | Records Keyboard Inputs | Records Keyboard Inputs |
| Records Mouse Clicks | Records Mouse Clicks | Records Mouse Clicks with coordinates |
| Object Information is stored in Object Repository | It Can't record Object Information | Records object information in the form of window or win objects | It is possible to edit scripts after recording | Not possible to edit the scripts after recording | It is possible to record scripts after recording |
| Recording a Signature is not possible | Alternative mode for recording signatures | |
| Recorded steps will run correctly on all objects | When we are recording with respect to window, the window object information will stores in object repository | Recorded steps may not run correctly on all objects |
| Support all methods for every object | Support the following methods for each test object Win test objects: Click, DblClick, Drag, Drop, Type Window Test Objects: Click, DblClick, Drag, Drop, Type, Activate, Minimise, Restore, Maximise | |
| This is a Default Recording Mode |
Keyword View
When you create a test, QTP Creates a graphical representation of the steps you perform on your application. These steps are displayed in Keyword view tab.
Keyword view shows object hierarchy in an icon-based table.
Keyword view enables to view the tests of your test in a keyword-driven, modular, table format. Each step is represented as a seperate row in the table.
The columns in the Keyword View show different information for each step, as follows:
- Item: Test object, utility object, function call, or statement in a hierarchical icon-based tree.
- Operation: Operation to be performed on the item, Ex: Click or Select.
- Value: Argument values for the selected operation, Ex: mouse button to use when clicking the image.
- Documentation: Auto-documentation of what the step does, in an easy-to-understand sentence. Ex: Click "findFlights" image.
- Assignment: Assigning a value to or from a variable (not visible by default.)
- Comment: Textual information regarding the step, (not visible by default.)
Tuesday, September 7, 2010
At time do we need to go for automation
2. We need to execute the test cases manually before automating, to know what results are produced.
3. Recognize the initial and End condition for the test
4. Make sure that we have standardized naming conventions before automating
5. We should know, what kind of data to use for automating the application
Actions in QTP
There are three types of actions in QTP
1. Reusable Actions: An action that can be called multiple times by the test with which it is sotred (the local test), as well as by other tests.
2. Non-Reusable Actions: An action that can be called only in the test with which it is stored, and can be called only one.
3. External Actions: A reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external aciton.
By default, new actions are non-reusable.