Micro Focus QTP (UFT) Forums
QTP from QC - close QTP after test run - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP from QC - close QTP after test run (/Thread-QTP-from-QC-close-QTP-after-test-run)



QTP from QC - close QTP after test run - janriis - 10-08-2009

Hi all

Im running a QTP test from Quality Center. The test runs as it should and the result is stored in QC (pass or fail). When the test run is finished, QTP is shown with the open script in read only mode.

Is there a way to close QTP after a test run and return to the result in QC ?

regards

Jan Riis Soerensen


RE: QTP from QC - close QTP after test run - Tarik Sheth - 10-08-2009

Hi,

Do you want to close the qtp after each iteration or when the test suite execution completes?

2. If you wish to close the qtp after all the iteration then following will help you.

Navigate to

C:\Program Files\Mercury Interactive\QuickTest Professional\bin\mic.ini

Find entry:

CloseToolAfterRuns=0
then
under [RemoteAgent]

and change it "CloseToolAfterRuns=1"

Restart the qtp and remote agent from QC as well.

2. If you are running from Quality center then by default the focus will be on Quality center after the execution.

Let us know if this helps.


RE: QTP from QC - close QTP after test run - basanth27 - 10-08-2009

FurtherMore, If you do not want to play with the .ini configuration file and would want to handle the QTP machines interacting with QC based on your preference, then write a vbs file using the QTP AOM to simply say,
Code:
Set oApp = CreateObject("QuickTest.Application")
oApp.Close
Set oApp = Nothing


On the QC, under test settings enter this vbs file as a cleanup script.


RE: QTP from QC - close QTP after test run - sreekanth chilam - 10-08-2009

Hi Jan Riis Soerensen ,

Infact you could use either of the above 2 solutions.

If you are executing scripts from QC, then i would suggest to go with Tariksheth solution. Smile


RE: QTP from QC - close QTP after test run - janriis - 10-08-2009

Thx guys, just what i needed.


RE: QTP from QC - close QTP after test run - basanth27 - 10-08-2009

Srikanth -
Just for your clarification, the solution i posted was specific to execution from QC.
Morever, I was expecting a solution in your post. Why would you need to suggest when the person who posted can try it out ?


RE: QTP from QC - close QTP after test run - sreekanth chilam - 10-08-2009

@Basanth : FYI, Its not mandatory that every post should contain a solution buddySmile

Moreover, I already knew that this post is specific to QC.
Out of 2 ways , i was suggesting to try & follow the Tariksheth solution, since Mic.ini file Settings are meant for closing Tool(QTP)after test run is finished required.


RE: QTP from QC - close QTP after test run - basanth27 - 10-09-2009

@ Everyone - Please be aware that every post on the forum is not a discussion but a solution seek. Discussion's are posted under different categories. Morever, there is no reason for anyone to come up with just posts explaining which solution to follow. the original poster is at the luxury to try out the various suggested solutions and use them.

Since Jan Riis Soerensen has the solution required, i have closed this thread.

Ankur has been intimated to take a look at such issues and maybe if possible add a few steps to the forum guidelines so that we dont have posts just for the sake of it.