NetworkSuite.Verify Method

Applies to TestComplete 14.10, last modified on June 5, 2019

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
NetworkSuite.State Property
State Property
State Property

Highlight search results