Synchronizing tests with screen areas

Image synchronization enables Citrix performance tests to keep track of the contents of a screen area during replay instead of focusing only on window events.

Before you begin

You can use image synchronization elements in a test to facilitate the test replay in applications that do not create or modify many windows, but update the contents of the window regularly.

The contents of an image are processed as a value that is either a calculated bitmap hashcode or a text string obtained by optical character recognition. During test execution, the test waits for the contents of a screen area to match the expected image synchronization value before proceeding with the test. If the value is not matched during the synchronization period, an image synchronization timeout is produced in the test log.

You can also add verification points to image synchronizations in the test editor. The verification point passes if the synchronization succeeds and fails if a timeout occurs.

You insert image synchronizations during test recording.

Procedure

  1. Start recording a Citrix performance test and record a sequence of user actions.
  2. To add an image synchronization to the recorded test, in the Citrix Recorder Control window, click the Insert image synchronization Insert image synchronization icon button, select an area of the screen that will be used for synchronization, and then click the Insert image synchronization button again.
  3. Continue the recording. When you have completed the sequence of actions to be tested, end the Citrix session cleanly and close the Citrix XenApp client. A progress window opens while the test is generated. On completion, the Recorder Control view displays the message Test generation completed, the Test Navigator lists your test, and the test opens in the test editor.
  4. In the test editor, select the Image synchronization element.
    1. Set the synchronization state to Conditional, Mandatory or Optional. In most cases, because you are explicitly requesting for a synchronization to occur, you should leave the synchronization state as Conditional.
    2. Specify one of two synchronization methods.
      • Select Bitmap hash code if you want the synchronization to occur when the selected area matches exactly the recorded image. A single pixel of difference will cause a synchronization timeout.
      • Select Optical character recognition if you want the synchronization to occur when a text string is recognized in the selected area. Click Extract text to test the text recognition on the recorded image. Note that for synchronization purposes the text recognition results must be repeatable, not necessarily accurate.
        Note: On Windows 2008, it is recommended to use the Bitmap hash code synchronization method for a Citrix test.

        You can click Extract text several times to make sure that the text recognition results are repeatable. If the recognized text differs, click Options to change the Zoom factor or other optical character recognition settings. You should not manually correct the recognized text.

        You can click Add to specify multiple expected text strings, Use regular expression to specify a text string as a regular expression, or Factorize to automatically generate a regular expression from multiple expected text strings.

    3. Specify whether you want to enable a verification point on the image synchronization. This enables the test to produce a pass or fail status in the Citrix Verification Points report.
Feedback