PTD Documentation

[Help Home] [Phantom Home]
Remote Execution

PTD can be used to execute Phantom scripts on remote machines. In order to accomplish this, each remote machine must have a Phantom Agent installed and running. When PTD runs a script on the remote machine, it contacts the Agent using a socket and requests that the script be run. The Agent then runs the requested script and passes all output back to PTD over the socket. Note that the script and all required files (declarations, function files, etc…) must exist on the remote machine in the same path as indicated by the testcase properties.

Remote execution is useful for testing applications on multiple operating systems or for running many tests concurrently. This allows for all the output from multiple machines to be view by a single PTD application. Additionally, all pre- and post- processing of the output is performed locally the PTD application. Therefore, any actions performed by pre- and post- processors will not occur on the remote machine, but on the machine running PTD.

For the purposes of this documentation, the PTD machine will be labeled the Server, and the Phantom Agent machine will be labeled the Client (or the Agent).

Preparing for Remote Execution
1. Install the Phantom Agent on the Client. For more information, see the Remote Agent.
2. Select a port to be used by the Phantom Agent. This is done in the Options dialog in the Phantom Agent. Remember this port, as it is required by PTD.
3. Record the ‘Machine Name’ as displayed in the Phantom Agent main window. This is the name by which PTD on the Server will contact the Phantom Agent on the Client. The Client’s IP address can also be used by PTD.
4. Open PTD on the Server. Select Run->Remote from the main menu. A dialog will appear as such:



5. Enter the name or IP address of the Client machine in the ‘Host’ field and enter the Client listening port in the ‘Port’ field. Then click ‘Add’. The new host will appear in the ‘Remote Agents’ section.
6. Click ‘Close’ to save the Remote Agent list to the workspace.
7. Copy all remote scripts to the Client machine. Be sure they have the same directory structure as on the Server machine.
8. PTD is now ready for remote execution.

Running Scripts on a Remote Machine
Once the Phantom Agent on the Client and PTD on the Server have been configured as described in ‘Preparing for Remote Execution’, scripts can be run on the Client and controlled by the Server. To start a remote execution run, perform the following:

1. Ensure the Phantom Agent is running on all Client machines.
2. Start PTD on the Server machine.
3. Ensure all Suite items that are to be run are checked. This must be done before opening the Remote Execution dialog, as Suite items cannot be modified in the Remote Execution dialog.
4. Select ‘Remote’ from the ‘Run’ menu in the main menu. This will open the Remote Execution dialog.
5. Select the Suite or Testcase to run from the displayed Suite. All checked suites and testcases will be run.
6. Select all the remote hosts where the remote execution will occur from the ‘Hosts’ list. To select multiple hosts, click them while holding the ‘CTRL’ key.
7. Click ‘Start’ to begin remote execution on the selected machines.

Once remote execution has begun, PTD will manage the execution across all selected client machines. A new output tab will be created for each machine. All output and input requests from that machine will be displayed in this output tab. Additionally, a new tab is opened in the output area that shows the status of all remote machines. This tab shows what script each machine is running, and can be used to stop the execution on remote machines.



Any pre- and post- processors will be run locally on the Server machine, and can access the output associated with the remote Client.


Copyright 2000-2011 Phantom Automated Solutions