NetworkSuite.ProjectType Property

Applies to TestComplete 12.60, last modified on September 17, 2018

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