03-27-2009, 10:19 AM
Hello,
i have implemented Recovery scenario in my scripts in the following way:
Error handling on error
is it the right way of error handling?also what should be the optimum Test settings in RUN tab for "When error occurs in run sessionop-up message should appears,stop the run,proceed to next iteration.proceed to next step"
I am working on java (Windows base application) with QTP9.2 version.Should recovery scenarios be used instead of the above mentioned code snippet?
Please advise asap.
Regards,
Rachna
i have implemented Recovery scenario in my scripts in the following way:
Error handling on error
Code:
call ActionOnError (err.number, err.Description)
'Error handling on succes
Call ActionOnSuccess
Sub ActionOnSuccess
reporter.ReportEvent 0,"Verifying that Action has rendered any error","NO,It is a SUCCESS"
End Sub
'Name:Recovery scenario subroutine
Sub ActionOnError(errNumber, errDesc)
If errNumber <> 0 Then
Reporter.ReportEvent micFail,"Login",errDesc
ExitAction(0)
End If
End Sub
is it the right way of error handling?also what should be the optimum Test settings in RUN tab for "When error occurs in run sessionop-up message should appears,stop the run,proceed to next iteration.proceed to next step"
I am working on java (Windows base application) with QTP9.2 version.Should recovery scenarios be used instead of the above mentioned code snippet?
Please advise asap.
Regards,
Rachna