You can use TSL statements to activate or deactivate a specific recovery scenario, or to deactivate all active recovery scenarios during a test run. You can also define simple recovery scenarios using TSL.
Activating and Deactivating Recovery Scenarios During the Test Run
The Recovery Manager enables you to activate or deactivate recovery scenarios while designing your test, but you may need to turn a recovery scenario on or off during a test run.
Suppose you define a recovery scenario that runs a recovery function. If the exception event triggers the recovery scenario, and then the exception event occurs again while the recovery function for that event is running, the recovery scenario may get stuck in an infinite loop. Thus it is recommended to deactivate the recovery scenario at the beginning of that recovery scenario’s recovery function, and to reactivate it at the end of the function. To activate and deactivate a specific recovery scenario use the exception_on and exception_off functions.
For example: The following recovery function turns off the handling of its recovery scenario before executing the main recovery script (which reopens the application being tested). Then it turns the recovery scenario on again. public function label_handler(in win, in obj, in attr, in val)
You can also deactivate all recovery scenarios during a test run. For example, you may want to prevent WinRunner from performing recovery scenarios if a certain conditional statement is true.To deactivate all active recovery scenarios, use the exception_off_all function.
Defining Simple Recovery Scenarios Using TSL
You can use the define_object_exception, define_popup_exception, and define_TSL_exception functions to define new simple recovery scenarios from your test script that are active only for the current WinRunner session. This can be useful if you want to use a returned value as input for your recovery scenario.
When you define a simple recovery scenario using one of the above functions, the simple recovery scenario is displayed in the Recovery Manager during the WinRunner session and you can modify the recovery scenario using the recovery wizard, but these recovery scenarios are not saved in the recovery scenarios file and are not available from the Recovery Manager when WinRunner restarts.
To create compound recovery scenarios, which enable you to define crash events and/or multiple recovery operations, use the Recovery Manager.
WinRunner Related Interview Questions
|SILK TEST Interview Questions||LoadRunner Interview Questions|
|WinRunner Interview Questions||HTML Interview Questions|
|QTP Interview Questions||Manual Testing Interview Questions|
|OpenStack Interview Questions||Automation Testing Interview Questions|
|API testing Interview Questions||Rational robot Interview Questions|
|Selenium IDE Interview Questions||Performance Testing Interview Questions|
|Test Director Interview Questions|
Winrunner At A Glance
Understanding How Winrunner Identifies Gui Objects
Understanding Basic Gui Map Concepts
Working In The Global Gui Map File Mode
Editing The Gui Map
Merging Gui Map Files
Configuring The Gui Map
Learning Virtual Objects
Checking Gui Objects
Working In The Gui Map File Per Test Mode
Working With Web Objects
Working With Activex And Visual Basic Controls
Checking Powerbuilder Applications
Checking Table Contents
Creating Data-driven Tests
Synchronizing The Test Run
Defining And Using Recovery Scenarios
Handling Web Exceptions
Using Regular Expressions
Enhancing Your Test Scripts With Programming
Creating User-defined Functions
Creating Compiled Modules
Calling Functions From External Libraries
Creating Dialog Boxes For Interactive Input
Understanding Test Runs
Analyzing Test Results
Running Batch Tests
Running Tests From The Command Line
Controlling Your Test Run
Setting Properties For A Single Test
Setting Global Testing Options
Customizing The Test Script Editor
Customizing The Winrunner User Interface
Setting Testing Options From A Test Script
Customizing The Function Generator
Initializing Special Configurations
Integrating With Quicktest Professional
Managing The Testing Process
Testing Systems Under Load
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.