NetworkSuite.SynchPoints Property

Applies to TestComplete 15.46, last modified on January 09, 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 SynchPoints property returns the collection of synchronization points defined in a network suite.

Declaration

NetworkSuite.SynchPoints

Read-Only Property The SynchPoints object

Applies To

The property is applied to the following object:

Property Value

The SynchPoints object that represents the collection of synchronization points defined in the current project.

Example

The following example demonstrates how you can access the synchpoint collection from script and synchronize tests execution by using the desired synchpoint from this collection. The example uses the SynchPoint.WaitFor method to simultaneously start creating new files on different computers. Remember that this code must be added to all the projects that will create files.

JavaScript, JScript

...
// Obtain the collection of synchronization points defined in the current project
MySynchPointCollection = NetworkSuite.SynchPoints;

// Obtain the synchpoint named Synchpoint1 from the collection
MySynchPoint = MySynchPointCollection.Synchpoint1;

// Synchronize the script execution flow of the current project with script execution flows of other projects
MySynchPoint.WaitFor();

// Call the routine that creates files
CreateFiles(0);
...

Python

# ...
# Obtain the collection of synchronization points defined in the current project 
MySynchPointCollection = NetworkSuite.SynchPoints
# Obtain the synchpoint named Synchpoint1 from the collection 
MySynchPoint = MySynchPointCollection.Synchpoint1
# Synchronize the script execution flow of the current project with script execution flows of other projects 
MySynchPoint.WaitFor()
# Call the routine that creates files 
CreateFiles(0)

VBScript

...
' Obtain the collection of synchronization points defined in the current project
Set MySynchPointCollection = NetworkSuite.SynchPoints

' Obtain the synchpoint named Synchpoint1 from the collection
Set MySynchPoint = MySynchPointCollection.Synchpoint1

' Synchronize the script execution flow of the current project with script execution flows of other projects
Call MySynchPoint.WaitFor

' Call the routine that creates files
Call CreateFiles(0)
...

DelphiScript

...
// Obtain the collection of synchronization points defined in the current project
MySynchPointCollection := NetworkSuite.SynchPoints;

// Obtain the synchpoint named Synchpoint1 from the collection
MySynchPoint := MySynchPointCollection.Synchpoint1;

// Synchronize the script execution flow of the current project with script execution flows of other projects
MySynchPoint.WaitFor;

// Call the routine that creates files
CreateFiles(0);
...

C++Script, C#Script

...
// Obtain the collection of synchronization points defined in the current project
MySynchPointCollection = NetworkSuite["SynchPoints"];

// Obtain the synchpoint named Synchpoint1 from the collection
MySynchPoint = MySynchPointCollection["Synchpoint1"];

// Synchronize the script execution flow of the current project with script execution flows of other projects
MySynchPoint["WaitFor"]();

// Call the routine that creates files
CreateFiles(0);
...

See Also

Distributed Testing
Synchronization Points
NetworkSuite.Synchronize

Highlight search results