|
Introduction
This page addresses the details of how to handle server loading when
scripts require desktop access.
Screen-Based Synchronization
In general, all screen-based activity, including
synchronization steps, should be avoided.
The desktop time line
can only be divided so many ways.
The synchronize on text or URL commands, SyncOnText, SyncOnURL, are OK to use because they can run OK with eValid minimized; there is no desktop activity needed.
But in most cases a synchronization step that uses a desktop image with the xySyncRec command requires lengthy exclusive use of the desktop. You'll have to Lock/Unlock around that and that process may limit the total number of copies of eValid that can run simultaneously. You can only divide the desktop time line up so many ways!
Remember, if one script is very slow to synchronize then the time taken to synchronize that step may interfere with the maximum loading capacity of your LoadTest scenario.
Lock/Unlock Command
Here is the script documentation for the Lock/Unlock Command.
Any concurrently executing eValid windows that use the Lock & Unlock commands will wait until there are no windows locked (i.e. in focus) before proceeding.
Lock can take an optional number parameter that specifies the number of milliseconds before the lock times out. This is only effective if no Unlock command is given or if the Unlock command is not reached before the timeout. If no parameter is given a default of 60000 msecs (1 minute) is used.
The Lock & Unlock commands are essential for scripts that involve ModalDialog commands, or for scripts which require focus to be maintained on a particular window. The block of eValid playback script commands that need to have exclusive focus locked should be wrapped in a Lock ... Unlock block, for example:
Lock & Unlock can be used at other times to ensure that the script runs in the foreground and all other eValid processes will wail until no other eValid windows are locked before continuing script playback.... Commands... Lock SubmitClick [parameters] ModalDialogWait 4000 ModalDialogEnter ... Unlock OtherCommands... ...
Note 1: AbsMouse and Keyboard events implicitly lock the playback process for the duration of the command. However, use of Lock/Unlock will enhance the reliability.
Note 2: SyncOnScreenRect locks the playback process before each attempt to validate the screen, and releases it after each attempt. It will NOT lock the process for the whole time it is attempting to validate. It will also be released when the validation has succeeded or has timed out. This allows multiple validations in different scripts to work concurrently.