NetworkSuite.Verify Method

Applies to TestComplete 15.69, last modified on November 13, 2024
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 Verify method checks if the network suite of the current project can be run. Namely, for each of the enabled tasks in each of the enabled jobs of this network suite, it performs initialization actions described in Verifying Tasks, Jobs, Hosts and Network Suite.

Declaration

NetworkSuite.Verify()

Result Boolean

Applies To

The method is applied to the following object:

Result Value

True if the network suite can be run, and False otherwise.

Remarks

The Verify method does not return the result until the network suite and all its jobs and tasks are in the Idle state. That is, if there are running tasks or jobs at the moment of a call, the method will not return until the task or job execution is over.

You cannot verify the network suite from the OnNetJobStateChange, OnNetSuiteStateChange and OnNetTaskStateChange event handlers.

Example

The following code snippet verifies the network suite and, if the verification is successful, runs the network suite.

JavaScript, JScript

function NetworkSuiteSample()
{
  …
  if (NetworkSuite.Verify())
  {
    Log.Message("The network suite can be run");
    NetworkSuite.Run(false);
    …
  }
  else
  {
    Log.Warning("The verification has failed");
    …
  }
  …
}

Python

def NetworkSuiteSample():
  if NetworkSuite.Verify():
    Log.Message("The network suite can be run")
    NetworkSuite.Run(True)
  else:
    Log.Warning("The verification has failed")

VBScript

Sub NetworkSuiteSample

  …
  If NetworkSuite.Verify Then
    Log.Message "The network suite can be run"
    NetworkSuite.Run False
    …
  Else
    Log.Warning "The verification has failed"
    …
  End If
  …
End Sub

DelphiScript

procedure NetworkSuiteSample();
begin
  …
  if NetworkSuite.Verify then
  begin
    Log.Message('The network suite can be run');
    NetworkSuite.Run(false);
    …
  end
  else
  begin
    Log.Warning('The verification has failed');
    …
  end;
  …
end;

C++Script, C#Script

function NetworkSuiteSample()
{
  …
  if (NetworkSuite["Verify"]())
  {
    Log["Message"]("The network suite can be run");
    NetworkSuite["Run"](false);
    …
  }
  else
  {
    Log["Warning"]("The verification has failed");
    …
  }
  …
}

See Also

Distributed Testing
NetworkSuite.Run
Host.Verify
Task.Verify
Job.Verify
State Property
State Property
State Property

Highlight search results