Active Property

Applies to TestComplete 15.47, last modified on January 20, 2023
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 Active property specifies whether the given job is enabled or disabled (the Active property of the job). A job must be enabled in order to run it via the network suite to which it belongs.

Declaration

JobObj.Active

Read-Write Property Boolean
JobObj An expression, variable or parameter that specifies a reference to a Job object

Applies To

The property is applied to the following object:

Property Value

True if the job is enabled, and False otherwise.

Example

For instance, you can check whether the desired job is enabled before running it:

JavaScript, JScript

function Test()
{
  var Job = NetworkSuite.Jobs.ItemByName("Job1");
  if (Job.Active)
    Job.Run(true);
}

Python

def Test():
  Job = NetworkSuite.Jobs.ItemByName["Job1"]
  if Job.Active:
    Job.Run(True)

VBScript

Sub Test
  Set Job = NetworkSuite.Jobs.ItemByName("Job1")
  If Job.Active Then
    Job.Run(True)
  End If
End Sub

DelphiScript

procedure Test;
var Job : OleVariant;
begin
  Job := NetworkSuite.Jobs.ItemByName['Job1'];
  if Job.Active then
    Job.Run(True);
end;

C++Script, C#Script

function Test()
{
  var Job = NetworkSuite["Jobs"]["ItemByName"]("Job1");
  if (Job["Active"])
    Job["Run"](true);
}

See Also

Distributed Testing
Job.Run
Job.Verify
Job.Stop

Highlight search results