Date post: | 16-Apr-2015 |
Category: |
Documents |
Upload: | krishna-keshav |
View: | 14 times |
Download: | 1 times |
© 2008, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice. Testing ServicesTesting Services
QTP Training
Recovery Scenarios
Objectives
After completing this chapter, you will be able to:
• Define a test exception.
• Create a recovery scenario.
• Associate a recovery scenario with a test.
Exceptional Events Unexpected or unpredicted events that occur during a test run that may
cause invalid test results or suspension of the test run before completion.
- An exception can occur in the AUT or can come from an external source. For example, the window “You have mail” or “Printer Out Of Paper” or notification of secure and non-secure messages due to different setups on browsers.
- Examples of errors that are not exceptions: an expected error message window when a bad password is entered, a prompt to save changes, a prompt to fill in an empty edit field.
Recovery Scenario
The Recovery Scenario Manager allows the tester to create and manage
recovery scenarios to identify and take appropriate action when an exception
occurs. Use a recovery scenario for exceptional or unpredictable events. Handle
expected errors and predictable events directly in the test.
Recovery Manager
Recovery Manager Wizard
Recovery Manager
• To access the Recovery Manager, choose TOOLSRECOVERY
SCENARIO MANAGER.
• Identify the trigger.
• Define the recovery operation.
• Define the post recovery operation.
• Associate the recovery scenario with a test.
Recovery Wizard Steps
Recovery Wizard
These are the steps to create a new recovery scenario file as opposed to adding an existing recovery scenario to a test:
1. Click on the NEW ORDER icon.
2. Identify the potential error.
3. Set a trigger to detect whether the error has occurred.
4. Take pre-determined steps to recover from the error.
5. Set post-recovery steps.
Recovery Wizard Steps
The Event Trigger
Trigger Event-Pop-Up
The first component of the recovery process is to identify the event that interrupts your test run.
Examples:
- A pop-up window
- An unacceptable object state
- A test step that did not complete successfully
- An application crash
The Event Trigger
Recovery Operation
Recovery Operation
Recovery Operation
If you use the Recovery Scenario Wizard, you will be asked to document
specifics that relate to the error type.
Post-Recovery Operation
Post-Recovery Operation
Post-Recovery Operation
Post recovery options depend on the recovery operation associated with the error.
Another example of a post-recovery operation list:
- Repeat current step
- Proceed to next step
- Proceed to next action
- Restart current step
- Stop the test run
Recovery Scenario File
The Recovery Scenario File
Recovery Scenario File
The Recovery Manager adds the newly-defined recovery scenario in to
the recovery file.
The file extension for recovery files is .qrs.
Recovery Error in Test Results
Test Results Using a Recovery Scenario
Recovery Error in Test Results
If a test uses a recovery scenario during the test run, you will see
evidence of this in the test results.
Optional Steps
Figure 8 Optional Step Selection
Optional Steps
An optional step is a step in the test that can be bypassed if the object is not found during playback.
Use an optional step when you have verified that a step is a temporary deviation from the business process flow and returns to complete the transaction without error.
In practice, when running a test, if a step does not succeed in opening a dialog box, QuickTest does not necessarily abort the run session.
QuickTest will bypass any step that is designed as optional. To set an optional step from the keyword view, right-click on the step you
consider to be optional.
Indication of Optional Step
Optional Step Icon
Indication of Optional Step
When a step has been designed as optional, a question mark appears
next to the step.
© 2008, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice.
Thank you
Testing ServicesTesting Services