NetworkSuite.State 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 State property returns the state of the network suite in the current project.

Declaration

NetworkSuite.State

Read-Only Property Integer

Applies To

The property is applied to the following object:

Property Value

An integer value that stands for the network suite’s state of the current project. Read the Network Suite States topic to learn about available network suite states.

Remarks

Use the NetworkSuite.WaitForState method to delay script execution until the network suite reaches a particular state.

Example

The following code is an event handler for the OnNetSuiteStateChange event. Every time the event occurs, the network suite’s state is posted to the test log.

JavaScript, JScript

// Handler for the event occurring each time the network suite state changes
function GeneralEvents_OnNetSuiteStateChange(Sender)
{
  Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State));
}

Python

# Handler for the event occurring each time the network suite state changes
def GeneralEvents_OnNetSuiteStateChange():
  Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State))

VBScript

' Handler for the event occurring each time the network suite state changes
Sub GeneralEvents_OnNetSuiteStateChange(Sender)
  Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State))
End Sub

DelphiScript

// Handler for the event occurring each time the network suite state changes
procedure GeneralEvents_OnNetSuiteStateChange(Sender: OleVariant);
begin
Log.Message('New Network Suite State = ' + aqConvert.IntToStr(NetworkSuite.State));
end;

C++Script, C#Script

// Handler for the event occurring each time the network suite state changes
function GeneralEvents_OnNetSuiteStateChange(Sender)
{
Log["Message"]("New Network Suite State = " + aqConvert["IntToStr"](NetworkSuite["State"]));
}

See Also

Distributed Testing
ProjectType Property
Tag Property
Run Method
Stop Method
WaitForState Method
OnNetSuiteStateChange Event

Highlight search results