qtp training day 2
Embed Size (px)
TRANSCRIPT
-
8/6/2019 QTP Training Day 2
1/29
2004 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice
Automation FundamentalConcepts
&
QTP At A Glance Day 2
Prepared By : Kolhar IR (Shiva) Created On : 27-09-2005
-
8/6/2019 QTP Training Day 2
2/29
Summary of Day 1 (Revision)
Summary of Day 1 from Attendees
Summary by Deepti about Day 1 training
Agenda for Day 2
-
8/6/2019 QTP Training Day 2
3/29
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
-
8/6/2019 QTP Training Day 2
4/29
Test Object Model Cont
How Quick test Pro learns objects inapplication ?
Quick Test first looks at the object on which
user is recording and stores it as a test object& then determines which test object class it fitsinto by,
1. Mandatory properties
2. Assistive properties..
3. Ordinal identifier
4. Smart Identification..
-
8/6/2019 QTP Training Day 2
5/29
Test Object Model Cont
1. Mandatory properties:
For each Test Object class, Quick Test has list of mandatory properties
2. Assistive properties:
Quick Test adds assistive properties one by one to the description until it
has compiled a unique description
3. Ordinal identifier:
If the combination of all defined mandatory and assistive properties is notsufficient to create a unique test object description, Quickest also recordsthe value for the selected ordinal identifier.
4. 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 inone or more property values.
-
8/6/2019 QTP Training Day 2
6/29
Test Object Model
How Quick Test Identifies objects during the test run?
Quick test searches for a run time object that exactlymatches the description of the test object from the objectrepository it learned while recording
-
8/6/2019 QTP Training Day 2
7/29
Test Object Model
Test Object :
Test Object is an object that Quick Testcreates in the test to represent the actual object in theapplication
Run Time Object :
It is the actual object in the web site or
application on which methods are performed during thetest run..
-
8/6/2019 QTP Training Day 2
8/29
Test Object Model
Viewing object properties by Object Spy :
Using the object spy, users can view the properties of anyobject in an open application
-
8/6/2019 QTP Training Day 2
9/29
Test Object Model
Viewing object methods and methods syntaxusing object spy
Object Spy enables users to view both the runtime object methods, the test object methodsassociated with an object and to view the syntaxfor a selected method
-
8/6/2019 QTP Training Day 2
10/29
Test Object Model
-
8/6/2019 QTP Training Day 2
11/29
Managing Test objects
Object Repository Dialog box :
- Per Action Mode
- Shared Action Mode
-
8/6/2019 QTP Training Day 2
12/29
Managing Test objects
Identifying the Object :
- Logical Name
- Class
Viewing the Objects Property :
Type - Constant, Data table property ,variable parameter.
Property - Name of the PropertyValue - The value of the property
- Smart Identifier
- Add/ Remove
-
8/6/2019 QTP Training Day 2
13/29
Managing Test Objects
Adding or Viewing New objects :
- Add New Objects
- Object spy
- Saves all the object properties and valuesfrom a per action object repository to aseparate file for use as a shared objectrepository in another test
- Modify the Test object properties
- Finding the Test object properties- Modifying the Logical Names
-
8/6/2019 QTP Training Day 2
14/29
Managing Test Objects
Object Properties Modification
Users can modify the properties of the temporary versionof the object during the test run with out affecting the
permanent values in the object repository
- SetTOProperty
- GetTOProperty
-
8/6/2019 QTP Training Day 2
15/29
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
-
8/6/2019 QTP Training Day 2
16/29
Please record a test and run the script.
Analyze the test result.
DEMO
-
8/6/2019 QTP Training Day 2
17/29
-
8/6/2019 QTP Training Day 2
18/29
Types of Checkpoints(Verification Process)
Standard Checkpoint Checks values of an objects properties Check that a radio button isselected.
Image Checkpoint Checks the property values ofan image
Check that the image source fileis correct.
Table Checkpoint Checks information in a table Check that the value in a tablecell is correct.
Page checkpoint Checks the characteristics of a Web page Check how long a Web pagetakes to load or if a Web pagecontains broken links.
Text /Text Area Checkpoint
Checks that a text string is displayed inthe appropriate place in a Web page orapplication window
Check whether the expectedtext string is displayed in theexpected location on a Webpage or dialog box
Bitmap Checkpoint Checks an area of aWeb pageor application after capturingit as a bitmap
Check that aWeb page (or anyportion of it) is displayed asexpected.
-
8/6/2019 QTP Training Day 2
19/29
Types of Checkpoints Cont
Database Checkpoint Checks the contents of databasesaccessed by an application orWeb site
Check that the value in adatabase query is correct.
AccessibilityCheckpoint
Identifies areas of a Web siteto check forSection 508 compliancy
Check if the images on a Webpage include ALT properties,
required by theW
3CW
ebContent Accessibility Guidelines.
XML Checkpoint Checks the data content ofXML documents
Note: XML file checkpoints areused to check a specified XML
file; XML application checkpointsare used to check an XMLdocument within a Web page.
-
8/6/2019 QTP Training Day 2
20/29
Demo on using checkpoints
Apply different types of checkpoints to therecorded test.
Analyze the test results
-
8/6/2019 QTP Training Day 2
21/29
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
-
8/6/2019 QTP Training Day 2
22/29
Creating Output Values
Creating an Output Value
Running and Analyzing a Test with Output Values
-
8/6/2019 QTP Training Day 2
23/29
Using Regular Expressions
Regular Expression Syntax
Working with Regular Expressions
Running and Analyzing a Test with Regular
Expressions
-
8/6/2019 QTP Training Day 2
24/29
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
-
8/6/2019 QTP Training Day 2
25/29
Recovery Scenarios
Defining Recovery Scenarios
Creating a Recovery File
Understanding the Recovery Scenario Manager
Dialog Box
Understanding the Recovery ScenarioWizard
Welcome to the Recovery ScenarioWizardS
creen
-
8/6/2019 QTP Training Day 2
26/29
Recovery Scenario
Welcome to the Recovery ScenarioWizardScreen
Select Trigger Event Screen
Specify Pop-up Window Conditions Screen
Select Object Screen
Set Object Properties and Values Screen
Select Test Run ErrorScreen
-
8/6/2019 QTP Training Day 2
27/29
Recovery Scenario
Select Processes Screen
Recovery Operations Screen
Recovery Operation Screen
Recovery Operation Click Button or Press KeyScreen
Recovery Operation Close Processes Screen
Recovery Operation Function Call Screen
-
8/6/2019 QTP Training Day 2
28/29
Recovery Scenario
Post-Recovery Test Run Options Screen
Name and Description Screen
Completing the Recovery ScenarioWizard
Screen
Saving the Recovery Scenario in a Recovery File
Managing Recovery Scenarios
-
8/6/2019 QTP Training Day 2
29/29
Thank You