Associate two recovery scenarios for a test in QTP
Is this possible for a test to have multiple recovery scenarios and the test has to trigger through specific recovery basing on the condition.
Here is the brief demonstration of it.
I have a piece of code which causes my script to fail (as it is known issue… I cant handle this through the script(constraint) ) I have written a recovery scenario(RS1) and it triggered properly when any error arises. Later I enhanced my script to capture my error which QTP throws during run time and depending on the error I want script to trigger recovery scenario (RS2). Is that possible …? (I have associated both the recoveries to the test…What I observed is it is running both the recovery scenarios whenever any error arises in the script).
One more doubt is how does ‘recovery scenarios’ differ from the ‘When error occurs during run session: Proceed to next step’
Re: Associate two recovery scenarios for a test in QTP
I am not sure it will run both the scenarios, the scenarios should be activated in the order they are arranged/assocaited in the recovery tab.
Proceed to next step will carry the error forward and will try to execute the next LOC.
Recovery scenarios will try to handle the error with whatever settings/function you have written and then move to next LOC. The chances error being carried forward here would be less, ofcourse depending on your RS
But yes, using custom functions are better than using RS