recovery scenario manager in qtp

By | July 29, 2009

Handling recovery scenario manager in qtp during runtime:
Hi friends,

I assume that you all know how to create and use recovery scenario manager which is used for exception handling purpose.

This is very easy you can create it through resources->recovery scenario manager, you can create recovery scenario files for different scenario according to your needs. QTP is guiding in step by step manner for creating recovery file so I don’t need to explain here.

Today I am going to give you a advance qtp script which attach and enable existing recovery scenario file (.qrs format) to qtp test during runtime.

Advance QTP Script to attach and enable recovery scenario manager file to qtp test during runtime:

——————————————————–

Dim qtApp

Set qtApp = CreateObject(“QuickTest.Application”)

qtApp.Test.Settings.Recovery.Enabled = True

qtApp.Test.Settings.Recovery.SetActivationMode “OnError”

qtApp.Test.Settings.Recovery.Add “C:\qtp\recovery.qrs”, “Recovery”, 1

qtApp.Test.Settings.Recovery.Item(1).Enabled = True
‘Above statement will enable recovery file for specific test.
———————————————————-
So using above advance qtp script you can attach and enable existing recovery scenario manager file to qtp test during runtime.

If you want to know about recovery scenario manager in detail, the best qtp tutorial that I suggest is QTP help. So just go through it for more qtp information on recovery scenario manager.

If you like this article, You can subscribe through mail.

2 thoughts on “recovery scenario manager in qtp

  1. Anonymous

    In QTP 11, the lines of code need to go in the following order to work:

    Dim qtApp

    Set qtApp = CreateObject(“QuickTest.Application”)

    qtApp.Test.Settings.Recovery.Enabled = True

    qtApp.Test.Settings.Recovery.Add “C:\qtp\recovery.qrs”, “Recovery”, 1

    qtApp.Test.Settings.Recovery.SetActivationMode “OnError”

    qtApp.Test.Settings.Recovery.Item(1).Enabled = True
    ‘Above statement will enable recovery file for specific test.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *