Hi

Yes, we can do what u asked for by following the below steps.

For each test script u have to mention "on error resume next" command.
If suppose a test script failed due a script issue or application issue,
then the a failed reporter event will be recorded and test will be failed.
Now we will set the test set setting in such a way that on failure we shall
launch  a test script which will clean up all the browsers opened and which
are not closed due a script issue or an application.
For doing this u need to create a cleanup script, which will be closing all
the browser or any other files(Excel, PDF and etc) opened in previous run by
QTP.

Coming to Test set setting for a failed test script to close the browser and
files, Navigate to test setting tab for the test set selected. Then click on
On Failure tab, Check the first checkbox and set the value to "0". Then
Select the second checkbox and select the cleanup script (ie test script to
close the browser and flies ).

Now run ur test set, if any of the test script fails a failed reporter event
will be logged and then QC will initiate the cleanup script and all the
browsers and files will be closed. Then the next test script will be
triggered.

Hope this will work for u......

Thanks,
Sreedhar


On Fri, Sep 19, 2008 at 11:54 PM, Pavan Turlapati
<[EMAIL PROTECTED]>wrote:

>
> Hi All!
>           I need your suggestion.
>
> Q: We have 30 Test Scripts all stored in Quality Center(QC) and all 30
> Test Scripts will come under a module and hence they form a Test
> Set.Now while executing the test scripts from QC, if 25th test case
> fail due to script error or Application Error or some other error I
> want the QTP to close all the browsers opened by it (QTP) and QC will
> stop executing this Test Script marking as failed and start the next
> Test Script i.e 26th Test Script.
>
> If everything goes fine without error, I ensured that all opened
> browsers will be closed by calling the necessary close methods but my
> only concern is when they fail.
>
> If at all I have to use some recovery scenarios please give the piece
> of code which has to be added in the recovery scenarios.
>
> Please find a possible solution as soon as possible.
> I can be even reachable through
> Email:[EMAIL PROTECTED] <[EMAIL PROTECTED]>
>
>
> Thanks in advance.
> Regards,
> Pavan Turlapati
>
> >
>


-- 
Mallipeddi Sreedhar
91-9848871279

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to