+ All Categories
Home > Documents > QTP-PPT-DAY3-CHAP4

QTP-PPT-DAY3-CHAP4

Date post: 16-Apr-2015
Category:
Upload: krishna-keshav
View: 14 times
Download: 1 times
Share this document with a friend
24
© 2008, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice. Testing Services Testing Services QTP Training
Transcript
Page 1: QTP-PPT-DAY3-CHAP4

© 2008, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice. Testing ServicesTesting Services

QTP Training

Page 2: QTP-PPT-DAY3-CHAP4

Recovery Scenarios

Page 3: QTP-PPT-DAY3-CHAP4

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.

Page 4: QTP-PPT-DAY3-CHAP4

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.

Page 5: QTP-PPT-DAY3-CHAP4

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.

Page 6: QTP-PPT-DAY3-CHAP4

Recovery Manager

Recovery Manager Wizard

Page 7: QTP-PPT-DAY3-CHAP4

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.

Page 8: QTP-PPT-DAY3-CHAP4

Recovery Wizard Steps

Recovery Wizard

Page 9: QTP-PPT-DAY3-CHAP4

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

Page 10: QTP-PPT-DAY3-CHAP4

The Event Trigger

Trigger Event-Pop-Up

Page 11: QTP-PPT-DAY3-CHAP4

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

Page 12: QTP-PPT-DAY3-CHAP4

Recovery Operation

Recovery Operation

Page 13: QTP-PPT-DAY3-CHAP4

Recovery Operation

If you use the Recovery Scenario Wizard, you will be asked to document

specifics that relate to the error type.

Page 14: QTP-PPT-DAY3-CHAP4

Post-Recovery Operation

Post-Recovery Operation

Page 15: QTP-PPT-DAY3-CHAP4

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

Page 16: QTP-PPT-DAY3-CHAP4

Recovery Scenario File

The Recovery Scenario File

Page 17: QTP-PPT-DAY3-CHAP4

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.

Page 18: QTP-PPT-DAY3-CHAP4

Recovery Error in Test Results

Test Results Using a Recovery Scenario

Page 19: QTP-PPT-DAY3-CHAP4

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.

Page 20: QTP-PPT-DAY3-CHAP4

Optional Steps

Figure 8 Optional Step Selection

Page 21: QTP-PPT-DAY3-CHAP4

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.

Page 22: QTP-PPT-DAY3-CHAP4

Indication of Optional Step

Optional Step Icon

Page 23: QTP-PPT-DAY3-CHAP4

Indication of Optional Step

When a step has been designed as optional, a question mark appears

next to the step.

Page 24: QTP-PPT-DAY3-CHAP4

© 2008, Cognizant Technology Solutions. All Rights Reserved. The information contained herein is subject to change without notice.

Thank you

Testing ServicesTesting Services


Recommended