Micro Focus QTP (UFT) Forums
Invoking QTP on other machine. - 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: Invoking QTP on other machine. (/Thread-Invoking-QTP-on-other-machine)



Invoking QTP on other machine. - Amit Singh Chauhan - 06-11-2008

Hi,
Please go through the following scenerio and tell me the solution.

There are two machines A and B
macine A have all the scripts and related functionality, and does not have QTP.

machine B have only QTP installed.

I want to invoke QTP from A and run test cases on B.

I have tried
Code:
set obj = CreateObject("QuickTest.Application","Machine BName")

but it gives an error : Permission Denied 'CreateObject'
error no. 800A0046


RE: Invoking QTP on other machine. - TestMe - 05-15-2009

You can try this code...

//* Test script to run in Machine A *//

Code:
Dim Process(1)

Machine=Array("Machine_B")    'Computer name of the Machine B

set Controller = CreateObject("WSHController")

For i=0 to UBOUND(Machine)

    Set Process(i) = Controller.CreateScript("D:\StartExecution.wsf", Machine(i))
    Process(i).Execute

Next


For i=0 to UBOUND(Process)-1

    While Process(i).Status<>2

        Wait(2)

    WEnd

Next

//*************//

//*****This Script shuld save in your machineA with 'wsf' extension the the 'D:' ******//
Code:
<package>
<job>
<script language="VBScript">


        Set QTP=Createobject("Quicktest.Application")
        QTP.visible=true
        QTP.launch

        QTP.open "YourScript Path in Machine A"  

        QTP.test.run

</script>
</job>
</package>


Hope this'll help you....Smile

Thanks..