NetworkSuite Object

Applies to TestComplete 14.20, last modified on September 11, 2019

Description

The NetworkSuite object gives you access from scripts to the network suite, which allows you to run TestComplete projects on remote machines that are accessible via the network. The NetworkSuite object is available if the NetworkSuite project item is included in the current project.

The NetworkSuite object is a top-level object. It has no parent, but it has child objects: Jobs, Hosts and Variables.

The NetSuite object is only available if your project contains the Network Suite project item.

Members

Example

The following code snippet launches the network suite to be run simultaneously with the entire script execution. If the network suite does not start running within one minute, the whole test execution stops.

JavaScript, JScript

function NetworkSuiteSample()
{
  // Launches the network suite
  NetworkSuite.Run(false);
  // If the network suite does not start running within the specified time period
  // The test execution stops
  if (! NetworkSuite.WaitForState(ns_Running, 1000 * 60))
    Runner.Stop();

  …

}

Python

def NetworkSuiteSample():
  # Launches the network suite
  NetworkSuite.Run(True)
  # If the network suite does not start running within the specified time period  
  # The test execution stops 
  if not NetworkSuite.WaitForState(ns_Running, 1000 * 60):
    Runner.Stop()

VBScript

Sub NetworkSuiteSample

  ' Launches the network suite
  NetworkSuite.Run(False)
  ' If the network suite does not start running within the specified time period
  ' The test execution stops
  If Not NetworkSuite.WaitForState(ns_Running, 1000 * 60) Then
    Runner.Stop
  End If
  …

End Sub

DelphiScript

procedure NetworkSuiteSample();
begin
  // Launches the network suite
  NetworkSuite.Run(false);
  // If the network suite does not start running within the specified time period
  // The test execution stops
  if not NetworkSuite.WaitForState(ns_Running, 1000 * 60) then
    Runner.Stop;

  …

end;

C++Script, C#Script

function NetworkSuiteSample()
{
  // Launches the network suite
  NetworkSuite["Run"](false);
  // If the network suite does not start running within the specified time period
  // The test execution stops
  if (! NetworkSuite["WaitForState"](ns_Running, 1000 * 60))
    Runner["Stop"]();

  …

}

See Also

Distributed Testing
Jobs Object
Hosts Object
Variables Object

Highlight search results