Citrix synchronization overview

During the run of a Citrix session, the test uses window events or image recognition to ensure that the correct user input actions are maintained on track with the application events coming from the Citrix server.

The synchronization mechanism enables the test to remain synchronized without relying only on the timing, which could vary with the load on the Citrix server.

Synchronization is different from the function of verification points. Verification points check specified values of the application, such as window synchronizations, and produce a test status: pass, fail, error, or inconclusive. Synchronization is used for test execution and produces synchronization timeouts in the test log when the test fails to recognize the server output.

Synchronization occurs on window events or through the recognition of a screen area that you specify.
  • Window event synchronization is produced automatically by the Citrix server. When the test is run, the virtual users send emulated user actions to the server, such as keyboard or mouse actions and the server responds with window events such as create, activate, or destroy. The test waits for the expected window events to occur before sending the next user actions to the server. The test uses window styles, and optionally, locations, sizes, and window titles, to recognize windows.
  • Image synchronization enables you to require additional recognition of screen area contents. The test can synchronize on either a unique bitmap hashcode that is calculated from the image or on a text string retrieved from the image through optical character recognition. In some applications, such as web browsers or word processors, the actual window content changes more frequently then the window objects. In these cases, you must manually add image synchronization to critical parts of the test during the recording so that the test can synchronize with the window contents.

During test execution, the test waits for the window event or the image recognition to synchronize the user actions independently from the load on the server. If an expected window event fails to occur or an expected image is not recognized, then the test produces a synchronization timeout that is reported in the test log. The test will attempt to resume the execution at the next synchronization point.

The base timeout delay is specified in the Citrix test generation preferences; however, the actual delay varies with the level of synchronization.

There are three levels of synchronization for window events and images that can be specified for each element in the test editor:
  • Conditional: This is the default behavior for main windows and dialog boxes. If the synchronization fails, the test tries to continue and the synchronization timeout is logged in the Citrix performance report and the test log.
  • Mandatory: If the synchronization fails after a period that is three times the base timeout delay (by default), the test exits with an error status and the connection with the Citrix server is closed. The test execution continues to run until test results are finalized.
  • Optional: Synchronization is not required but is logged in the test log. A timeout occurs after 1/10th of the base timeout delay.
The default timeout values can be overridden for each synchronization element in the test editor. The test recorder automatically sets the recommended synchronization level for window events depending on their nature:
  • Main window create events are set to mandatory.
  • Other window create events are set to conditional.
  • Main window destroy events are set to conditional.
  • Other window destroy events are set to optional.
  • Image synchronizations are set to conditional.