Task Object

Applies to TestComplete 15.65, last modified on July 17, 2024
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.


The Task object represents one of the tasks specified in the particular job of the given network suite (see Editing Task Properties). You obtain a task as an item in the task collection (see Tasks Object).



The following script runs all tasks (except for the last one) belonging to the network suite's first job.

JavaScript, JScript

function Test()
  var Tasks = NetworkSuite.Jobs(0).Tasks;
  for (var i = 0; i < Tasks.Count - 1; i++)


def Test():
  Tasks = NetworkSuite.Jobs.Items[0].Tasks
  for i in range (0, Tasks.Count - 1):


Sub Test
  Set Tasks = NetworkSuite.Jobs(0).Tasks
  For i = 0 To Tasks.Count - 2
End Sub


procedure Test;
var Tasks, i : OleVariant;
  Tasks := NetworkSuite.Jobs[0].Tasks;
  for i := 0 to Tasks.Count - 2 do

C++Script, C#Script

function Test()
  var Tasks = NetworkSuite["Jobs"](0)["Tasks"];
  for (var i = 0; i < Tasks["Count"] - 1; i++)

See Also

Distributed Testing
Editing Task Properties
Tasks Object
Items Property
ItemByName Property

Highlight search results