NetworkSuite.SynchPoints Property

Applies to TestComplete 14.40, last modified on April 22, 2021

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