Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

When running distributed testing with SilkTest, how do I connect to the local machine using the Connect() statement?

When running distributed testing with SilkTest, how do I connect to the local machine using the Connect() statement?

The normal method of connecting to a local machine during distributed testing is to use the SetMachine statement e.g.

[ ] string sLocalMachine = "MyPC" // host network name
[ ] HMACHINE hLocalMachine=GetMachine()
[ ] SetMachine(hLocalMachine)
[ ] //Do the testing here
[ ] Disconnect(hLocalMachine)

If you wish to use the Connect() statement, you must ensure that Agent on the local machine is set to local | TCP/IP under Options | Runtime on the SilkTest menu. The following statement will then work:

[ ] HMACHINE hLocalMachine=GetMachine()
[ ] Disconnect(hLocalMachine)
[ ] hLocalMachine = Connect ()
[ ] // Do the testing here
[ ] Disconnect(hLocalMachine)

You do not require the machine name parameter to connect to the local PC.

Note that you must disconnect the current Agent before attempting to connect to the local machine. This also applies if connecting to the local machine is the first connection action in the distributed test. It is required because SilkTest 2008 launches and connects to the local Agent before any further actions are taken.

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:35
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.