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
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
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
Sub GeneralEvents_OnNetSuiteStateChange(Sender)
Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State))
End Sub
DelphiScript
procedure GeneralEvents_OnNetSuiteStateChange(Sender: OleVariant);
begin
Log.Message('New Network Suite State = ' + aqConvert.IntToStr(NetworkSuite.State));
end;
C++Script, C#Script
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