Running Automation Scripts on a Remote Computer

By default, when you create an Application object in your automation script, it is created on your local computer (using your local copy of QuickTest Professional). You also have the option to run automation scripts on a remote QuickTest computer. To do so, you must:

  • Ensure that the Distributed COM (DCOM) Configuration Properties of the remote computer are set to allow you to run QuickTest Professional Automation from your computer.
  • Specify the remote computer in the automation script in the application creation script line, for example, using the optional location argument in the VBScript CreateObject function.
Setting DCOM Configuration Properties on the Remote Computer

QuickTest automation enables QuickTest to act as a COM automation server. Therefore, to run a QuickTest automation script on a remote computer, you must ensure that the DCOM configuration properties for that computer give you the proper permissions to launch and configure the QuickTest COM server.

The procedure below describes the steps you need to perform on the remote computer to enable your automation script to run on that computer. Note that the DCOM Configuration Property the appearance and names of the dialog boxes and options mentioned here may vary depending on the computer's operating system.

To enable automation scripts to access a QuickTest computer remotely:

  1. On the computer where you want to run the automation script, choose Start > Run. The Run dialog box opens.
  2. Enter dcomcnfg and click OK. The Distributed COM Configuration Properties dialog box or the Component Services window opens (depending on your operating system) and displays the list of COM applications available on the computer.
  3. Select QuickTest Professional Automation from the list and open the Properties dialog box for the application. (Click the Properties button or right-click and choose Properties, depending on your operating system.)
  4. In the QuickTest Professional Automation Properties dialog box, click the Security tab.
  5. In the launch permissions section, choose the custom option and click Edit.
  6. Use the Add and Remove options to select the network users or groups for which you want to allow or deny permission to launch QuickTest Professional via an automation script. When you are finished, click OK to save your settings.
  7. Repeat steps 5 and 6 for the configuration permissions section to select the users or groups who can modify QuickTest Professional configuration options via an automation script.
  8. In the QuickTest Professional Automation Properties dialog box, click the Identity tab and select the interactive user option.
  9. Click OK to save the QuickTest Professional Automation Properties settings.
  10. Click OK to close the Distributed COM Configuration Properties dialog box or the Component Services window.
Creating an Application Object on a Remote Computer

Once you have set the necessary DCOM Configuration settings for a remote computer, you can specify that computer in your automation script.

In VBScript, you do this by specifying the computer name as the optional location argument of the CreateObject function. The computer name should be the same as the computer name portion of a share name. For example, to run an automation script on a computer called MyServer, you could write:

Dim qtApp

Set qtApp = CreateObject("QuickTest.Application", "MyServer")

For information on the syntax for specifying the remote computer in another language you are using, refer to the documentation included with your development environment or to general documentation for the programming language.

4 comments:

Ramesh said...

good and clear,
Thanks

Unknown said...

Hi ,

I have QTP installed in machine A and following your steps I want to run the QTP script on machine B using machine A's QTP .
I followed your steps and access the remote folder and click on QTPro.exe its doing something but i can see anything on machine B also I am not getting any error.
(Before following your steps when i was doing it I was getting an error)

Although I am able to run other exe such as QTReport.exe from the remote machine

Due to this reason when I am creating a object by giving the remote machine name its not creating it .

Could some one please help me on
this

Regards,
Lucky

Anoop said...

Thanks for the blog. When i run the .VBS file that should invoke the QTP in another machine i am getting the "permission denied" error. I have added all groups and given all permissions but still i am getting this error.

Any help

Unknown said...

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