RemoteApplication Property

Applies to TestComplete 15.0, last modified on November 17, 2021
The Network Suite functionality is deprecated. We don’t recommend using it for distributed testing. Consider using a CI/CD system for managing distributed tests. See Migrating Distributed Tests to CI/CD Systems for details. In case you need to run web tests on multiple environments in parallel, you can also try using your project’s Execution Plan.

Description

The RemoteApplication property specifies which testing application, TestComplete or TestExecute, will be used to run the given task on the remote workstation (see the Remote application property of the task).

Declaration

TaskObj.RemoteApplication

Read-Write Property Integer
TaskObj An expression, variable or parameter that specifies a reference to a Task object

Applies To

The property is applied to the following object:

Property Value

One of the following constants defined in the Consts object, which stands for the assigned application:

Constant Value Description
ra_TC 0 TestComplete
ra_TE 1 TestExecute

Example

The following code snippet obtains a task and specifies that TestComplete will be used to run the task on a remote computer.

JavaScript, JScript

function Test()
{

  var Task, TaskName;
  // Specifies the name of the task
  TaskName = "MyTask";
  // Obtains the task by its name
  Task = NetworkSuite.Jobs.ItemByName("MyJob").Tasks.ItemByName(TaskName);

  // Specifies that TestComplete will be used on the remote host
  Task.RemoteApplication = ra_TC;
  // Specifies the host on which the task will be run
  Task.Host = NetworkSuite.Hosts.ItemByName("SlaveComputer1");

  // Specifies the path to the project the task will run
  Task.ProjectPath = "D:\\Distributed Testing\\Slave\\SlaveProject.mds";
  // Specifies the test item the task will run
  Task.Test = "Slave_Script\\Script\\Slave\\Main";

  // Runs the task
  Task.Run(true);
}

Python

def Test():
  # Specifies the name for the task
  TaskName = "MyTask"
  # Obtains the task by its name
  Task = NetworkSuite.Jobs.ItemByName["MyJob"].Tasks.ItemByName[TaskName]
  # Specifies that TestComplete will be used on the remote host
  Task.RemoteApplication = ra_TC
  # Specifies the host on which the task will be run
  Task.Host = NetworkSuite.Hosts.ItemByName["SlaveComputer1"]
  # Specifies the path to the project the task will run
  Task.ProjectPath = "D:\\Distributed Testing\\Slave\\SlaveProject.mds"
  # Specifies the test item the task will run
  Task.Test = "Slave_Script\\Script\\Slave\\Main"
  # Runs the task
  Task.Run(True)

VBScript

Sub Test

  Dim Task, TaskName
  ' Specifies the name of the task
  TaskName = "MyTask"
  ' Obtains the task by its name
  Set Task = NetworkSuite.Jobs.ItemByName("MyJob").Tasks.ItemByName(TaskName)

  ' Specifies that TestComplete will be used on the remote host
  Task.RemoteApplication = ra_TC
  ' Specifies the host on which the task will be run
  Set Task.Host = NetworkSuite.Hosts.ItemByName("SlaveComputer1")

  ' Specifies the path to the project the task will run
  Task.ProjectPath = "D:\Distributed Testing\Slave\SlaveProject.mds"
  ' Specifies the test item the task will run
  Task.Test = "Slave_Script\Script\Slave\Main"

  ' Runs the task
  Task.Run(True)
End Sub

DelphiScript

procedure Test();
var Task, TaskName;
begin

  // Specifies the name of the task
  TaskName := 'MyTask';
  // Obtains the task by its name
  Task := NetworkSuite.Jobs.ItemByName['MyJob'].Tasks.ItemByName[TaskName];

  // Specifies that TestComplete will be used on the remote host
  Task.RemoteApplication := ra_TC;
  // Specifies the host on which the task will be run
  Task.Host := NetworkSuite.Hosts.ItemByName['SlaveComputer1'];

  // Specifies the path to the project the task will run
  Task.ProjectPath := 'D:\Distributed Testing\Slave\SlaveProject.mds';
  // Specifies the test item the task will run
  Task.Test := 'Slave_Script\Script\Slave\Main';

  // Runs the task
  Task.Run(true);
end;

C++Script, C#Script

function Test()
{

  var Task, TaskName;
  // Specifies the name of the task
  TaskName = "MyTask";
  // Obtains the task by its name
  Task = NetworkSuite["Jobs"]["ItemByName"]("MyJob")["Tasks"]["ItemByName"](TaskName);

  // Specifies that TestComplete will be used on the remote host
  Task["RemoteApplication"] = ra_TC;
  // Specifies the host on which the task will be run
  Task["Host"] = NetworkSuite["Hosts"]["ItemByName"]("SlaveComputer1");

  // Specifies the path to the project the task will run
  Task["ProjectPath"] = "D:\\Distributed Testing\\Slave\\SlaveProject.mds";
  // Specifies the test item the task will run
  Task["Test"] = "Slave_Script\\Script\\Slave\\Main";

  // Runs the task
  Task["Run"](true);
}

See Also

Distributed Testing
ActionAfterRun Property
CopyRemoteLogMode Property
Host Property
PriorInstanceMode Property
Test Property

Highlight search results