NetworkSuite.ProjectType Property

Applies to TestComplete 15.43, last modified on September 08, 2022
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 ProjectType property indicates the network suite type of the current project.

Declaration

NetworkSuite.ProjectType

Read-Only Property Integer

Applies To

The property is applied to the following object:

Property Value

One of the following constants that specify the network suite type of the current project:

Constant Value Description
ptMaster 0 The network suite of the current project is of the master type. It means that the project was run by itself, not by a task defined in the network suite of another master project.
ptSlave 1 The network suite of the current project is of the slave type. It means that the project was run by a task defined in the network suite of the master project.

Example

The following example posts the project type to the test log.

JavaScript, JScript

function NetworkSuiteSample()
{
  …

  if (NetworkSuite.ProjectType == 0)
    Log.Message("The current project is the master project");
  else
    Log.Message("The current project is a slave project");

  …

}

Python

def NetworkSuiteSample():
  # ...
  if NetworkSuite.ProjectType == 0:
    Log.Message("The current project is the master project")
  else:
    Log.Message("The current project is a slave project")
  # ...

VBScript

Sub NetworkSuiteSample

  …

  If NetworkSuite.ProjectType = 0 Then
    Log.Message "The current project is the master project"
  Else
    Log.Message "The current project is a slave project"
  End If

  …

End Sub

DelphiScript

procedure NetworkSuiteSample();
begin
  …

  if NetworkSuite.ProjectType = 0 then
    Log.Message('The current project is the master project')
  else
    Log.Message('The current project is a slave project');

  …

end;

C++Script, C#Script

function NetworkSuiteSample()
{
  …

  if (NetworkSuite["ProjectType"] == 0)
    Log["Message"]("The current project is the master project");
  else
    Log["Message"]("The current project is a slave project");

  …

}

See Also

Distributed Testing
Projects Participating in Distributed Testing
NetworkSuite.State

Highlight search results