Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Query:Recovery Scenario
#1
Solved: 11 Years, 4 Months ago
Hello,

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 sessionTongueop-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
Reply
#2
Solved: 11 Years, 4 Months ago
hi,

Would appreciate if anyone can repond to my query asap.

Warm Regards,
Rachna
Reply
#3
Solved: 11 Years, 4 Months ago
hi rachana,

Infact as far as predictability of Errors are concerned, below are the 2 ways for proceeding:

1) For predictable Run Time Errors :

we should go for "On Error Resume next" & "Err" object

2) For Unpredictable Errors :

such as Third Party Pop ups(Printer Out of paper,etc..)
We should go for Recovery Scenario
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Create Video of a scenario shivangshah 0 1,235 01-30-2017, 07:45 PM
Last Post: shivangshah
  Query regarding "Call" statement anupam4j 1 2,028 09-26-2014, 01:46 PM
Last Post: vinod123
  Default recovery scenario TurtleRock 1 2,916 05-30-2014, 02:17 PM
Last Post: Tarik Sheth
  Edit Recovery Scenario skegler 0 3,284 03-05-2014, 10:40 PM
Last Post: skegler
  Data Table Query Suma Parimal 4 4,767 01-21-2014, 12:50 PM
Last Post: Suma Parimal

Forum Jump:


Users browsing this thread: 1 Guest(s)