SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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 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
 

Mehr von 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
 

Kürzlich hochgeladen

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
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
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 

Kürzlich hochgeladen (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
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...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

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

Hinweis der Redaktion

  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.