1. Can anyone help me with recovery scenarios, each type
with examples and also what is on error resume next?

Answer Posted / ajay

While executing your scripts you may get some
UNEXPECTED/UNPREDICTABLE errors. (like printer out of
paper). To "recover" the test (and continue running) from
these unexpected errors you use Recovery Scenarios.
Types:
Trigger Event. The event that interrupts your run session.
For example, a window that may pop up on screen, or a QTP
run error.
Recovery Operations. The operations to perform to enable
QTP to continue running the test after the trigger event
interrupts the run session. For example, clicking an OK
button in a pop-up window, or restarting Microsoft Windows.
Post-Recovery Test Run Option. The instructions on how QTP
should proceed after the recovery operations have been
performed, and from which point in the test QTP should
continue, if at all. For example, you may want to restart a
test from the beginning, or skip a step entirely and
continue with the next step in the test.

On Erro resume Next:
If you can predict that a certain event may happen at a
specific point in your test or component, it is recommended
to handle that event directly within your test or component
by adding steps such as If statements or optional steps
or "on error resume next", rather than depending on a
recovery scenario. Using Recovery Scenarios may result in
unusually slow performance of your tests.They are designed
to handle a more generic set of unpredictable events which
CANNOT be handled programmatically.
For Example:
A recovery scenario can handle a printer error by clicking
the default button in the Printer Error message box.
You cannot handle this error directly in your test or
component, since you cannot know at what point the network
will return the printer error. You could try to handle this
event in your test or component by adding an If statement
immediately after the step that sent a file to the printer,
but if the network takes time to return the printer error,
your test or component may have progressed several steps
before the error is displayed. Therefore, for this type of
event, only a recovery scenario can handle it.
I would not go into details of how to create files and how
to define them since they are fully covered in QTP
Documentation. Mercury QuickTest Professional User's Guide
> Working with Advanced Testing Features > Defining and
Using Recovery Scenarios >

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between run time object and test object?

571


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

581


who QTP recognizes the object stored in object repository?

1655


Is it possible to call win runner script in qtp?

617


What are the different recording modes and how do they work?

603






Explain the benefits of quick test pro(qtp)?

561


What is the default add-ins in qtp?

548


Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

3207


what is object and child object.. explain ..if possible give some example for better understanding ..

1525


How many add-ins comes by default with quicktest professional?

545


Explain the parameter in qtp?

571


What are the different types of action?

545


PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME

5915


Explain the types of object repositorys in qtp?

562


i have to login into gmail loginpage i have to pass testcase into userid and password by using functions. the test case of user id is it should take only lowerletters alphabetin between 4 to 6 length.it should not take spectial letters.it should not take numbers.testcase for password is it should take numbers and it should not take alphabets note the following things must happen 1 when i give correct password and userid that password and userid should be seen in QTP result and notepad,xl sheet 2 when i gave in valid password the system willgive message please give valid password that particular messaage should be seen in QTP result,norepa and xl sheet

1747