RemoteApplication Property

Applies to TestComplete 14.10, last modified on June 5, 2019

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