SlideShare une entreprise Scribd logo
1  sur  20
Recovery Scenarios





What is Recovery Scenario?
When to use Recovery Scenario?
Recovery Scenario Wizard
Trigger Events
 Recovery Operations
 Post-Recovery Operation
 Naming







Properties of Recovery Scenarios
Setting Scenarios for the Tests
Using Recovery Object Methods.
Session Wrap-Up

pgorantla.blogspot.com
Recovery Scenarios



While running a test in QTP there are certain Unexpected events,
errors, and application crashes which can distort your run session
and distort results.



This can result in the test run getting suspended until the occurred
event has been corrected.



User may have to again begin the complete test run which can be
tedious if the test script is very long or there are more than two or
more
tests called in the current run.



A Recovery Scenario helps the user as it indicates QTP with regards
to
the corrective action needed to be taken in case of the unwanted event
occurred during the test run.



Example is you can instruct QTP to detect a Printer out of paper
message and recover the run session by clicking the OK button to
close
the message and continue the test or component.
pgorantla.blogspot.com
Recovery Scenarios



Recovery Scenarios are generally called by QTP on
occurrence of any
error during the test run.



Conditions where the user can predict any
unexpected event, it is
recommended to use optional steps or if conditions in
the script.



Recovery scenarios should be used only for
unpredictable events, or events that you cannot
synchronize with a specific step in your test or
component.
pgorantla.blogspot.com
Recovery Scenarios



User has to be careful while adding recovery
scenarios as it gets
activated only after a step returns an error, which
can
potentially occurs several steps after the one that
actually caused the
error.



Alternatively, checking for trigger events after
every step, may slow
performance.
pgorantla.blogspot.com
Recovery Scenarios





A Recovery scenario wizard helps the user in
defining recovery scenarios, save them and also
associate these to the corresponding tests. The
path is Tools>Recovery Scenario Manager> New
scenario.
A recovery scenario wizard consists of the
following;
Trigger events
 Recovery Operation
 Post-Recovery Test Run Option
 Name
 Finish


pgorantla.blogspot.com
Recovery Scenarios

•

Trigger Events: Indicates for which event the user needs to add an
recovery scenario.

•

Consists of the following events:
– Pop-up Window: A window pops up in an opened application during the test run.
– Object State: The property values of an object in your application match specified
values. You can specify property values for each object in the hierarchy.
– Test run error: A step in your test does not run successfully.
– Application crash: An open application fails during the test run.

pgorantla.blogspot.com
Recovery Scenarios







QTP detects a pop-up window and identifies it
according to the window title and textual content.
In this the user has the option to set Window title
and/or contents within the Window making it
convenient to QTP in calling the corresponding
scenario.
The user will have to initially
capture the screen user the
object spy for identification
by QTP.

Note: It is preferable that the user selects regular expressions option as it will help if any contents in the captured text
changes. Also if either Window title or text contains check box are not selected then QTP will not check for the
corresponding option.
pgorantla.blogspot.com
Recovery Scenarios







QTP detects a specific test object state and
identifies it according to its property values and
the property values of all its ancestors.
The user will have to identify the object using the
Object spy and the corresponding object or parent
properties get captured.
Further the user has the option to add or remove
certain properties that shall be used by QTP for
identification during scenario call.

Note: An object is identified only by its property values, and not by its class.
pgorantla.blogspot.com
Recovery Scenarios





QTP detects a run error and identifies it by a
failed return value from a method. This option
consists of a list in the drop down box as shown
below.
User selects any one of the error conditions and
the corresponding description for that error
occurs in the description box.

pgorantla.blogspot.com
Recovery Scenarios





QTP detects an application crash and identifies it
according to a predefined list of applications
When the user selects this trigger event, he gets
an list of applications from which he will have to
select the applications that might cause a error.
Each time this application causes the error the
scenario is called.

pgorantla.blogspot.com
Recovery Scenarios



In this screen the user defines the kind of recovery operation that
QTP needs to perform once the event has occurred.



The different operations are;


Key or mouse operation: The following operations can be performed

 Clicks Default button or Enter key.
 Clicks Cancel button or Esc key.
 Click any button on the corresponding screen which the user can highlight by

using the Spy available
 user can provide a combination of keys which the QTP will operate on the key
board.


Close application: The processes declared by the user while defining the
Application crash trigger event shall be identified by QTP and closed once
this event occurs.



Function Call Screen: User has a option wherein he can call a function
stored in the Library depending upon the type of trigger event and the
Select Function option.



Restarting Microsoft Windows: This option will lead to sudden
termination of your script run and will close all the applications.
pgorantla.blogspot.com
Recovery Scenarios



The user then gets the option to decide what QTP
will perform once the recovery operation is implied.
It will operate one of the following below given
conditions;


Repeat current step and continue



Proceed to next step



Proceed to next iteration



Restart Current test run



Stop the Current Run
pgorantla.blogspot.com
Recovery Scenarios





Once the user has completed creating the scenario
he will have the option to name the scenario and
description.
User shall get all the conditions associated with
the corresponding scenario and will have an
option;
Add the scenario to the Current test
 Add scenario to default test settings.


pgorantla.blogspot.com
Recovery Scenarios





The user can view the properties set to the
created scenario.
The user can also edit the created scenario, copy
the current to an new test and also delete the
scenario.

pgorantla.blogspot.com
Recovery Scenarios








The user can add a scenario to the test by Test>Settings and
in the dialog box select Recovery tab.
The user clicks on the “+”
symbol and gets an new box
from where he can import a
new recovery scenario and
insert it to the current test.
Also depending upon the
importance of the scenario
the user can either enable or disable
the current scenario through the check
box
The user can also prioritize the scenarios depending upon
their importance in the test using the arrow keys available.
pgorantla.blogspot.com
Recovery Scenarios



User can utilize the Recovery object to control the recovery
mechanism
programmatically during the run session.



User can also use the Recovery object's method to force QTP to check
for triggers after a specific step in the run session.



User can define a recovery scenario that looks for and closes specified
open processes when an object's properties have a certain state. This
state shows the object's property values as they would be if the
problematic processes were open.



User can instruct QTP to activate the recovery mechanism if the
checkpoint fails so that QTP will check for and close any problematic
open processes and then try to perform the checkpoint again.

pgorantla.blogspot.com
Recovery Scenarios

Method/Property

Description

Activate Method

Explicitly activates the recovery scenario mechanism at a specific point in the run.

GetScenarioName Method

Retrieves the name and source file of a recovery scenario, according to the specified position in
the list of recovery scenarios associated with the test or component.

GetScenarioPosition
Method

Returns the position of a recovery scenario in the list of recovery scenarios associated with the
test or component, according to the specified name and source file.

GetScenarioStatus Method

Returns the status of a recovery scenario (True = enabled or False = disabled), according to
the specified position in the list of recovery scenarios associated with the test or
component.

SetScenarioStatus Method

Enables or disables the specified recovery scenario, according to its position in the list of
recovery scenarios associated with the test or component.

Count Property

Returns the number of recovery scenarios associated with the current test or component.

Enabled Property

Recovery default property. Retrieves or sets the status of the recovery scenario mechanism for
the current test or component.

pgorantla.blogspot.com
Recovery Scenarios

Q & A….

pgorantla.blogspot.com
Recovery Scenarios











Recovery scenario helps the user to avoid any
interference during the test run.
During the Test run if any error occurs then QTP
calls any one of the recovery scenario assigned to
the test.
A single test can have more than one Recovery
Scenario.
It consists of Trigger event, Recovery operation,
Post-Recovery Test run options.
Recovery Object Methods are available to call and
activate the various scenarios.
pgorantla.blogspot.com

Contenu connexe

Tendances (16)

Java Unit Testing
Java Unit TestingJava Unit Testing
Java Unit Testing
 
Qtp Tutorials
Qtp TutorialsQtp Tutorials
Qtp Tutorials
 
J unit a starter guide
J unit a starter guideJ unit a starter guide
J unit a starter guide
 
JUnit 4
JUnit 4JUnit 4
JUnit 4
 
JUNit Presentation
JUNit PresentationJUNit Presentation
JUNit Presentation
 
Software testing basics and its types
Software testing basics and its typesSoftware testing basics and its types
Software testing basics and its types
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Qtp 9.5 Tutorials by www.onsoftwaretest.com
Qtp 9.5 Tutorials by www.onsoftwaretest.comQtp 9.5 Tutorials by www.onsoftwaretest.com
Qtp 9.5 Tutorials by www.onsoftwaretest.com
 
JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit Tests
 
Thread & concurrancy
Thread & concurrancyThread & concurrancy
Thread & concurrancy
 
Unit Testing with JUnit4 by Ravikiran Janardhana
Unit Testing with JUnit4 by Ravikiran JanardhanaUnit Testing with JUnit4 by Ravikiran Janardhana
Unit Testing with JUnit4 by Ravikiran Janardhana
 
Introduction to JUnit
Introduction to JUnitIntroduction to JUnit
Introduction to JUnit
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorial
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECH
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 

Similaire à Recovery Scenario in QTP

Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3Ramu Palanki
 
Qtp 8.0 basic
Qtp 8.0 basicQtp 8.0 basic
Qtp 8.0 basicmedsherb
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon StudioRapidValue
 
360 view on Load and Performance Testing
360 view on Load and Performance Testing360 view on Load and Performance Testing
360 view on Load and Performance TestingMaheshShri1
 
Qtp 9.2 tutorials
Qtp 9.2 tutorialsQtp 9.2 tutorials
Qtp 9.2 tutorialsmedsherb
 
QTP with Descriptive programming
QTP with Descriptive programmingQTP with Descriptive programming
QTP with Descriptive programmingKuldeep Sharma
 
Qtp with descriptive programming
Qtp with descriptive programmingQtp with descriptive programming
Qtp with descriptive programmingmedsherb
 
Qtp With Descriptive Programming
Qtp With Descriptive ProgrammingQtp With Descriptive Programming
Qtp With Descriptive ProgrammingKuldeep Sharma
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769subhasis100
 
qtp 9.2 features
qtp 9.2 featuresqtp 9.2 features
qtp 9.2 featureskrishna3032
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769subhasis100
 
Qtp 92 Tutorial Anil
Qtp 92 Tutorial AnilQtp 92 Tutorial Anil
Qtp 92 Tutorial Anilguest3373d3
 
Qtp 9.2 Tutorial
Qtp 9.2 TutorialQtp 9.2 Tutorial
Qtp 9.2 Tutorialguest37ae7f
 

Similaire à Recovery Scenario in QTP (20)

Troubleshooting with QTP
Troubleshooting with QTPTroubleshooting with QTP
Troubleshooting with QTP
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 
Qtp 8.0 basic
Qtp 8.0 basicQtp 8.0 basic
Qtp 8.0 basic
 
Qtp 80 Basics3561
Qtp 80 Basics3561Qtp 80 Basics3561
Qtp 80 Basics3561
 
Qtp training
Qtp trainingQtp training
Qtp training
 
Qtp training
Qtp trainingQtp training
Qtp training
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
 
360 view on Load and Performance Testing
360 view on Load and Performance Testing360 view on Load and Performance Testing
360 view on Load and Performance Testing
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
 
QTP 9.2
QTP 9.2QTP 9.2
QTP 9.2
 
Qtp 9.2 tutorials
Qtp 9.2 tutorialsQtp 9.2 tutorials
Qtp 9.2 tutorials
 
QTP with Descriptive programming
QTP with Descriptive programmingQTP with Descriptive programming
QTP with Descriptive programming
 
Qtp with descriptive programming
Qtp with descriptive programmingQtp with descriptive programming
Qtp with descriptive programming
 
Qtp With Descriptive Programming
Qtp With Descriptive ProgrammingQtp With Descriptive Programming
Qtp With Descriptive Programming
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769
 
qtp 9.2 features
qtp 9.2 featuresqtp 9.2 features
qtp 9.2 features
 
Ppt Qtp
Ppt QtpPpt Qtp
Ppt Qtp
 
Qtp 92 Tutorial769
Qtp 92 Tutorial769Qtp 92 Tutorial769
Qtp 92 Tutorial769
 
Qtp 92 Tutorial Anil
Qtp 92 Tutorial AnilQtp 92 Tutorial Anil
Qtp 92 Tutorial Anil
 
Qtp 9.2 Tutorial
Qtp 9.2 TutorialQtp 9.2 Tutorial
Qtp 9.2 Tutorial
 

Plus de Praveen Gorantla (12)

File System Object in QTP
File System Object in QTPFile System Object in QTP
File System Object in QTP
 
Selenium WebDriver FAQ's
Selenium WebDriver FAQ'sSelenium WebDriver FAQ's
Selenium WebDriver FAQ's
 
QTP Functions
QTP FunctionsQTP Functions
QTP Functions
 
VB Script Overview
VB Script OverviewVB Script Overview
VB Script Overview
 
Regular Expressions in QTP
Regular Expressions in QTPRegular Expressions in QTP
Regular Expressions in QTP
 
Dynamic Content in QTP
Dynamic Content in QTPDynamic Content in QTP
Dynamic Content in QTP
 
Business Process Testing
Business Process TestingBusiness Process Testing
Business Process Testing
 
QTP Basics-2
QTP Basics-2QTP Basics-2
QTP Basics-2
 
QTP with QualityCenter
QTP with  QualityCenterQTP with  QualityCenter
QTP with QualityCenter
 
Virtual objects
Virtual objectsVirtual objects
Virtual objects
 
2.regular expressions
2.regular expressions2.regular expressions
2.regular expressions
 
1.qtp basics
1.qtp basics1.qtp basics
1.qtp basics
 

Dernier

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 

Dernier (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

Recovery Scenario in QTP

  • 1.
  • 2. Recovery Scenarios    What is Recovery Scenario? When to use Recovery Scenario? Recovery Scenario Wizard Trigger Events  Recovery Operations  Post-Recovery Operation  Naming      Properties of Recovery Scenarios Setting Scenarios for the Tests Using Recovery Object Methods. Session Wrap-Up pgorantla.blogspot.com
  • 3. Recovery Scenarios  While running a test in QTP there are certain Unexpected events, errors, and application crashes which can distort your run session and distort results.  This can result in the test run getting suspended until the occurred event has been corrected.  User may have to again begin the complete test run which can be tedious if the test script is very long or there are more than two or more tests called in the current run.  A Recovery Scenario helps the user as it indicates QTP with regards to the corrective action needed to be taken in case of the unwanted event occurred during the test run.  Example is you can instruct QTP to detect a Printer out of paper message and recover the run session by clicking the OK button to close the message and continue the test or component. pgorantla.blogspot.com
  • 4. Recovery Scenarios  Recovery Scenarios are generally called by QTP on occurrence of any error during the test run.  Conditions where the user can predict any unexpected event, it is recommended to use optional steps or if conditions in the script.  Recovery scenarios should be used only for unpredictable events, or events that you cannot synchronize with a specific step in your test or component. pgorantla.blogspot.com
  • 5. Recovery Scenarios  User has to be careful while adding recovery scenarios as it gets activated only after a step returns an error, which can potentially occurs several steps after the one that actually caused the error.  Alternatively, checking for trigger events after every step, may slow performance. pgorantla.blogspot.com
  • 6. Recovery Scenarios   A Recovery scenario wizard helps the user in defining recovery scenarios, save them and also associate these to the corresponding tests. The path is Tools>Recovery Scenario Manager> New scenario. A recovery scenario wizard consists of the following; Trigger events  Recovery Operation  Post-Recovery Test Run Option  Name  Finish  pgorantla.blogspot.com
  • 7. Recovery Scenarios • Trigger Events: Indicates for which event the user needs to add an recovery scenario. • Consists of the following events: – Pop-up Window: A window pops up in an opened application during the test run. – Object State: The property values of an object in your application match specified values. You can specify property values for each object in the hierarchy. – Test run error: A step in your test does not run successfully. – Application crash: An open application fails during the test run. pgorantla.blogspot.com
  • 8. Recovery Scenarios    QTP detects a pop-up window and identifies it according to the window title and textual content. In this the user has the option to set Window title and/or contents within the Window making it convenient to QTP in calling the corresponding scenario. The user will have to initially capture the screen user the object spy for identification by QTP. Note: It is preferable that the user selects regular expressions option as it will help if any contents in the captured text changes. Also if either Window title or text contains check box are not selected then QTP will not check for the corresponding option. pgorantla.blogspot.com
  • 9. Recovery Scenarios    QTP detects a specific test object state and identifies it according to its property values and the property values of all its ancestors. The user will have to identify the object using the Object spy and the corresponding object or parent properties get captured. Further the user has the option to add or remove certain properties that shall be used by QTP for identification during scenario call. Note: An object is identified only by its property values, and not by its class. pgorantla.blogspot.com
  • 10. Recovery Scenarios   QTP detects a run error and identifies it by a failed return value from a method. This option consists of a list in the drop down box as shown below. User selects any one of the error conditions and the corresponding description for that error occurs in the description box. pgorantla.blogspot.com
  • 11. Recovery Scenarios   QTP detects an application crash and identifies it according to a predefined list of applications When the user selects this trigger event, he gets an list of applications from which he will have to select the applications that might cause a error. Each time this application causes the error the scenario is called. pgorantla.blogspot.com
  • 12. Recovery Scenarios  In this screen the user defines the kind of recovery operation that QTP needs to perform once the event has occurred.  The different operations are;  Key or mouse operation: The following operations can be performed  Clicks Default button or Enter key.  Clicks Cancel button or Esc key.  Click any button on the corresponding screen which the user can highlight by using the Spy available  user can provide a combination of keys which the QTP will operate on the key board.  Close application: The processes declared by the user while defining the Application crash trigger event shall be identified by QTP and closed once this event occurs.  Function Call Screen: User has a option wherein he can call a function stored in the Library depending upon the type of trigger event and the Select Function option.  Restarting Microsoft Windows: This option will lead to sudden termination of your script run and will close all the applications. pgorantla.blogspot.com
  • 13. Recovery Scenarios  The user then gets the option to decide what QTP will perform once the recovery operation is implied. It will operate one of the following below given conditions;  Repeat current step and continue  Proceed to next step  Proceed to next iteration  Restart Current test run  Stop the Current Run pgorantla.blogspot.com
  • 14. Recovery Scenarios   Once the user has completed creating the scenario he will have the option to name the scenario and description. User shall get all the conditions associated with the corresponding scenario and will have an option; Add the scenario to the Current test  Add scenario to default test settings.  pgorantla.blogspot.com
  • 15. Recovery Scenarios   The user can view the properties set to the created scenario. The user can also edit the created scenario, copy the current to an new test and also delete the scenario. pgorantla.blogspot.com
  • 16. Recovery Scenarios     The user can add a scenario to the test by Test>Settings and in the dialog box select Recovery tab. The user clicks on the “+” symbol and gets an new box from where he can import a new recovery scenario and insert it to the current test. Also depending upon the importance of the scenario the user can either enable or disable the current scenario through the check box The user can also prioritize the scenarios depending upon their importance in the test using the arrow keys available. pgorantla.blogspot.com
  • 17. Recovery Scenarios  User can utilize the Recovery object to control the recovery mechanism programmatically during the run session.  User can also use the Recovery object's method to force QTP to check for triggers after a specific step in the run session.  User can define a recovery scenario that looks for and closes specified open processes when an object's properties have a certain state. This state shows the object's property values as they would be if the problematic processes were open.  User can instruct QTP to activate the recovery mechanism if the checkpoint fails so that QTP will check for and close any problematic open processes and then try to perform the checkpoint again. pgorantla.blogspot.com
  • 18. Recovery Scenarios Method/Property Description Activate Method Explicitly activates the recovery scenario mechanism at a specific point in the run. GetScenarioName Method Retrieves the name and source file of a recovery scenario, according to the specified position in the list of recovery scenarios associated with the test or component. GetScenarioPosition Method Returns the position of a recovery scenario in the list of recovery scenarios associated with the test or component, according to the specified name and source file. GetScenarioStatus Method Returns the status of a recovery scenario (True = enabled or False = disabled), according to the specified position in the list of recovery scenarios associated with the test or component. SetScenarioStatus Method Enables or disables the specified recovery scenario, according to its position in the list of recovery scenarios associated with the test or component. Count Property Returns the number of recovery scenarios associated with the current test or component. Enabled Property Recovery default property. Retrieves or sets the status of the recovery scenario mechanism for the current test or component. pgorantla.blogspot.com
  • 19. Recovery Scenarios Q & A…. pgorantla.blogspot.com
  • 20. Recovery Scenarios      Recovery scenario helps the user to avoid any interference during the test run. During the Test run if any error occurs then QTP calls any one of the recovery scenario assigned to the test. A single test can have more than one Recovery Scenario. It consists of Trigger event, Recovery operation, Post-Recovery Test run options. Recovery Object Methods are available to call and activate the various scenarios. pgorantla.blogspot.com

Notes de l'éditeur

  1. Briefly review the session agenda as indicated here. Currently we are in the “Prep Session Introduction” section, during which we will review basic information about this session, including how to use Centra to participate. Note: The Prep Session Introduction section should take no longer than 15 minutes.
  2. Spend a few moments answering participants’ questions about the agenda of this session or the Centra controls they will be using. Remind them to use the “Raise Hand” icon to ask a question.