1

There are some questions regarding this topic, but thought I'd ask my about my unique situation...

Background - We are attempting to execute a QTP script via Jenkins. Now, Jenkins is running on a Windows Server, on which we are having some QTP install issues (that topic is for another thread...). As a workaround, I am trying to execute a simple AOM VBScript invoking QTP on a remote client machine (running Windows XP) and execute the test on that machine...

Setup - Just for initial proof-of-concepts, a .VBS file located on a Windows 7 box (the "calling box") has the following command:

Set qtpApp = CreateObject("QuickTest.Application","WinXPMachineName")

Problem - I am getting the following error on the calling box:

ActiveX component can't create object: 'QuickTest.Application'

I have followed the instructions to set up QTP for remote execution on the Windows XP machine. Note that QTP isn't installed on the Window 7 box .

rs79
  • 2,311
  • 2
  • 33
  • 39

5 Answers5

3

QuickTest Pro must be installed on the local machine (in your case, your Windows 7 computer) even though you'll ultimately launch QTP elsewhere. This is because Set qtApp = CreateObject("QuickTest.Application", "MyServer") summons the local installation of QTP to open. Once the local QTP is open, it should communicate with the remote server and instruct the remote server to begin the test cases.

So, yes, you will need QTP installed on the local machine. (This is not troublesome if you have concurrent aka 'floating' licenses. If you have the seat licenses, that means they are paying for each individual computer that QTP is installed on. If that's the case, I don't know what to recommend.)

An alternate method:
I've been wrestling with remotely-launching QTP test scripts, particularly by launching them through the Windows Task Scheduler (That way, you wouldn't need QTP on the local machine, only on the remote machine). Here are a few questions I've had that hopeful might blaze a trail:

Community
  • 1
  • 1
Michael Innes
  • 2,045
  • 5
  • 25
  • 41
1

I was using another automation tool than QTP but I faced the same issue. I was told I had to have the software "QAWP" installed in both machines to be able to run it remotely, but my company was reluctant on buying a second license for just this and wanted another solution 'Cheaper one'. So:

  • In the test machine have a batch file that executes your tests.
  • Add a scheduled tasks in windows that calls your batch file.
  • from any other machine you can start the scheduled tasks using the command:

    schtasks /run /s /tn

vaab
  • 9,685
  • 7
  • 55
  • 60
ram Bilek
  • 11
  • 1
0
  1. both launch and remote machines have to be in the same domain and logged in as the same user that you gave access in the DCOM settings
  2. turn off firewall if possible or add qtp to the exceptions

works perfectly for me

Charan
  • 11
  • 1
0

Can anyone tell if Set qtApp = CreateObject("QuickTest.Application", "MyServer") works if working with QTP trail version? I have QTP trail version on two Win7 64bit machine. When I use the above code to start QTP on my remote machine form vbscript then it works.

But when i try executing it from QTP it fails. I have the right DCOM settings and all administrative privileges on both machines and my QTP is also running as admin. So does it only work when I have licence installed?

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76
0

To add more info to whoever still looking for answer to invoke QTP/UFT in remote machines:

Using VBScript to invoke QTP/UFT tests in remote machine is old school approach. I would suggest you to use Jenkins. It has tons of advantages.

Check here for more details.

vins
  • 15,030
  • 3
  • 36
  • 47