Wednesday, October 5, 2011

QTP: Recovery scenarios in QTP

Recovery Scenarios
Unexpected events during a test run disrupt a test or may give invalid test results. For example, during a test run, an application error may occur. This error does not permit the automated test to navigate to the feature, screen, or module that needs to be tested. These unexpected errors and events are called exceptions.
Recovery scenarios are used when you cannot predict at what step the error can occur .
When QTP encounters an exception during a run session, it displays a run error window.
A recovery Scenario consists of the following components:
Trigger: Specifies the exception that may occur during a run session.
The following are the 4 trigger event that QTP provides.
1.Pop up window
2.Object state
3. Test run error
4.Application crash
Recovery: Instructs QTP how to handle the exception
Post-Recovery: Instruct QTP how to proceed after the recovery operations are performed.
The following are the 6 Post-Recovery steps that QTP provides
1) Repeat current step and continue
2) Proceed to next step
3) Process to next action or component iteration
4) Proceed to next test iteration.
5) Restart current test run.
6) Stop the test run.