Verify the correct screen content is displayed during Citrix replay.
Screen synchronization offers a means of verifying replayed Citrix content. It differs from standard script verifications because it allows verification of window and screen region appearances (as opposed to input values) and they are inserted during script recording, not during subsequent script customization.
Procedure to generate screen region synchronization during recording:
- Record a Citrix session as described in the Citrix Tutorial
START | ALL PROGRAMS | SILK | SILK PERFORMER x.x | DOCUMENTATION | TUTORIALS | CITRIX
- During recording, press the Select Region button on the Silk Performer Citrix Recorder.
- Click your mouse onscreen and drag it to select a screen region for which you wish to generate synchronization. Note: Because differences as small as a single pixel can cause the synchronization processes to fail, it's recommended that you select the minimum screen area required for text verifications. Otherwise, unanticipated screen differences (e.g., disabled toolbars) may affect verification results.
- The Selection dialog appears. Specify how you wish to have screen region coordinates scripted (Script absolute coordinates, Script coordinates relative to window, No coordinates, or Use Full Window). When windows are maximized there is effectively no difference between absolute and relative coordinates. When windows are not maximized, relative coordinates are measured from the top-left corner of the Citrix Recorder window.
- Specify the Content Matching Type that the Citrix player should wait for during replay (content match, content mismatch, or content change).
- Click OK to add the synchronization to your Citrix test script.
START | ALL PROGRAMS | SILK | SILK PERFORMER x.x | DOCUMENTATION | TUTORIALS | CITRIX | SCREEN SYNCHRONIZATION & VERIFICATION
Screen synchronization is achieved via CitrixWaitForScreen functions, which are not scripted automatically by the recorder. These functions are inserted via the Screen Region dialog during recording. CitrixWaitForScreen functions compare replay and record bitmaps to determine whether or not they are identical. Hash values, as opposed to actual bitmaps, are used to compare the images. This is to save on resource consumption during replay.
To verify replay screen regions against hash values that are captured at recording it's necessary that the same color depth that is used during recording also be used during replay. Scripts will fail if these specifications are not maintained because changes as small as a single pixel can change hash values and result in replay content
appearing to be different from recorded content.
It's vital that windows that are maximized during recording are maximized during replay. This is because replay cannot change the state of windows (it can only resize and move them). So if a window state changes (e.g., from Maximized to Restored), then it is likely that some user input in the script caused the change (e.g., clicking the Restore button). On replay the user will click at the same position (which is now the Maximize button) and consequently a different operation will be executed-the subsequent CitrixWaitForWindowRestore function will fail.