Saturday, July 4, 2009

Working with Test Objects in QTP

Test Object Model Conceptualization

Applying the Test Object Model Concept

Viewing Object properties Using Object Spy

Demo on Test Object Model features of QTP



Mandatory properties:
For each Test Object class, Quick Test has list of mandatory properties…

Assistive properties:
Quick Test adds assistive properties one by one to the description until it has compiled a unique description…

Ordinal identifier:
If the combination of all defined mandatory and assistive properties is not sufficient to create a unique test object description, Quickest also records the value for the selected ordinal identifier.

Smart Identification:
A Smart Identification definition can help QuickTest identify an object, if it is present, even when the recorded description fails due to changes in one or more property values.

Test Object Model
How Quick Test Identifies objects during the test run?
Quick test searches for a run time object that exactly matches the description of the test object from the object repository it learned while recording…

Test Object :
Test Object is an object that Quick Test creates in the test to represent the actual object in the application…

Run Time Object :

It is the actual object in the web site or application on which methods are performed during the test run..

Test Object Model

Viewing object properties by Object Spy :
Using the object spy, users can view the properties of any object in an open application…


Viewing object methods and methods syntax using object spy…

Object Spy enables users to view both the run time object methods, the test object methods associated with an object and to view the syntax for a selected method…


Managing Test objects

Object Repository Dialog box :
- Per Action Mode
- Shared Action Mode


Managing Test objects
Identifying the Object :
- Logical Name
- Class

Viewing the Objects Property :

Type - Constant, Data table property ,variable parameter.
Property - Name of the Property
Value - The value of the property
- Smart Identifier
- Add/ Remove


Adding or Viewing New objects :
- Add New Objects
- Object spy
- Saves all the object properties and values from a per action object repository to a separate file for use as a shared object repository in another test…
- Modify the Test object properties
- Finding the Test object properties
- Modifying the Logical Names
Object Properties Modification
Users can modify the properties of the temporary version of the object during the test run with out affecting the permanent values in the object repository
- SetTOProperty
- GetTOProperty

Main phases of QTP testing Process
Preparing to record
Recording a session on the application
Executing the test
Enhancing your test
Debugging your test
Re-executing the tests on a new version of the application
Analyzing the test results
Reporting defects
Types of Checkpoints (Verification Process)





Parameterising Tests

Different Types of Parameters
Test & Action Parameters
Data Table
Environment Variable
Defining a Data Table Parameter
Adding Parameter Values to a Data Table
Modifying Steps Affected by Parameterization
Running and Analyzing a Parameterized Test

Creating Output Values

Creating an Output Value
Running and Analyzing a Test with Output Values

Using Regular Expressions

Regular Expression Syntax
Working with Regular Expressions
Running and Analyzing a Test with Regular Expressions

Dividing Tests into Multiple Actions

Working with Multiple Actions
Creating New Actions
Inserting Existing Actions
Parameterizing an Action
Running and Analyzing a Multi-action Test
Different Types of Actions

Recovery Scenarios

Defining Recovery Scenarios
Creating a Recovery File
Understanding the Recovery Scenario Manager Dialog Box
Understanding the Recovery Scenario Wizard
Welcome to the Recovery Scenario Wizard Screen
Select Trigger Event Screen
Specify Pop-up Window Conditions Screen
Select Object Screen
Set Object Properties and Values Screen
Select Test Run Error Screen
Select Processes Screen
Recovery Operations Screen
Recovery Operation Screen
Recovery Operation – Click Button or Press Key Screen
Recovery Operation – Close Processes Screen
Recovery Operation – Function Call Screen
Post-Recovery Test Run Options Screen
Name and Description Screen
Completing the Recovery Scenario Wizard Screen
Saving the Recovery Scenario in a Recovery File
Managing Recovery Scenarios

No comments: