Building a Script File

Let us now begin script building.

  1. Create a new script named Citrix using steps 1-7 explained in Building a Script File.
  2. Next, begin capturing the images, clicks, and key strokes that form part of the user transactions that are to be emulated. Since the Citrix Receiver client has to be accessed through the web, open a web browser and enter the URL of the web interface i.e., the Citrix StoreFront. In our case, the URL is http://192.168.11.151/Citrix/StoreWeb.
  3. The Citrix Receiver client login page will then appear as shown in Figure 1. Proceed to capture the image of the Citrix Receiver in Figure 1 as your first transaction.

    Figure 1 : The Citrix Receiver client login page

  4. Place the cursor on the Citrix Receiver and enable the image capturing by pressing the F8 key. The Menu pop up window will then appear as shown in Figure 9.
  5. By default, the Bitmaps, OCR, Anchors option will be selected in the Menu pop up window (see Figure 9). Pressing the Enter key will lead you to the Capture Bitmap/OCR/Transactions window as shown in Figure 2.
  6. This window allows you to save the captured Citrix Receiver image as a transaction. By default, the image that is captured will appear in the Capture Bitmap section. This capture will be associated with the Shape option of the Capture Type section and the MouseMoveImage option of the Mouse Action section, by default. Typically, when you select the Shape option, the AppsMon for Windows recognizes the capture as an image and saves the capture in BMP format. Likewise, you can select any of the option from the Mouse Action field based on your requirement.
  7. Alternately, if you select the OCR option from the Capture Type section, the AppsMon for Windows recognizes the capture as a text and automatically displays the captured text in the Value text box of the OCR section. Suppose if the capture is not successful, then instead of the captured text, Empty will be displayed in the Value text box. This way, you can identify that your capture was not successful and you can either capture the text once again or adjust the coordinates of the capture – i.e., in our case the Citrix Receiver by moving the ‘+’ or ‘-‘ keys in the Capture Bitmap section (see Figure 2).
  8. To save the captured Citrix Receiver as a transaction, enter the name of the transaction in the New Transaction Name text box of the Transactions section and press the Enter key.

    4

    Figure 2 : Capturing the image of the Citrix Receiver

    6

    Figure 3 : The Citrix Receiver client home page

  9. Now, to record your second transaction, login to the Citrix Receiver client with valid User Name and Password credentials. In Figure 3 that appears, capture the image above the XenDesktop by following the steps mentioned above.

    7

    Figure 4 : Capturing the image of the XenDesktop

  10. Clicking on the image above the XenDesktop will lead you to Figure 5.

    Figure 5 : The XenDesktop - Desktop Viewer page

  11. Try capturing the Start button in Figure 5 as your next transaction by following the steps 4-8 described above (see Figure 6).

    Figure 6 : Capturing the image of the Start icon

  12. Now, open a Notepad application published on the XenDesktop by following the menu sequence: Start->All Programs->Accessories->Notepad (see Figure 5).
  13. To capture the Notepad icon as your next transaction, follow the steps 4- 8 described above (see Figure 7).

    Figure 7 : Capturing the Notepad icon

  14. Now key in a few words in the Notepad and close the application without saving the message. Then, logging out of the XenDesktop will lead you back to the home page of the Citrix Receiver client.
  15. To exit the Citrix Receiver client, select the Log Off option that appears when you click on the down arrow available near the Citrix\Administrator in the home page of the Citrix Receiver client (see Figure 8). To capture this as your next transaction, follow the steps 4- 8 described above.

    Figure 8 : The Citrix Receiver administrator page

    Figure 9 : Capturing the image of the drop down icon

  16. Once you have saved all the required transactions, you can stop the recording by selecting the Stop Recording option from the Menu pop up window that appears when you press the F8 key (see Figure 10).

    13

    Figure 10 : Stopping the Recording

    Once the recording is stopped, a callout message stating Session Hooked will appear above the icon. A Create Script window will now appear which will start compiling the script automatically. Once the script has been built successfully, a message stating Build is Success will appear in the Create Script window and an executable of the script will be created – in our example this will be Citrix-1.exe (see Figure 11). The script that is recorded will be stored in the following location:

    C:\Documents and Settings\All Users\Application Data\Itexis\Components\Scripts

    citrix create script 2

    Figure 11 : The Create Script window showing that the script was built successfully

  17. Now, the script will load automatically to open its corresponding Player window. Close the Player window and open the Recorder window by clicking the Show Recorder option (usually done by right clicking the icon).
  18. The Exe tree available in the Components section will now host the executable that was just created i.e., Citrix- 1 (see Figure 12).

    recorder window for citrix

    Figure 12 : Viewing the Citrix-1 in the Exe tree

    Figure 13 : The error message that is displayed in the Player window

  19. Clicking on the executable Citrix-1 will load the script and lead you to the Player window. Click the Start button (see Figure 18) to start playing the recorded script.
  20. During playback, if any of the transactions could not be completed due to reasons like say for e.g., the image captured is disoriented from its original location or removed, the script will abort and stop immediately. An error message as shown in will then appear.
  21. Once the script is successfully played back, a dialog box displaying the reference time or the total time taken to emulate the transactions will appear. Save the reference time for the script (see Figure 14) by clicking the Yes button and close the player window.

    Figure 14 : The calculated reference time for the script

  22. By default, the logs created while emulating the transactions will not be stored in the database. To save the logs in a particular location of the database, say for e.g., XWCF_Logs, then set the Savelogondatabase for the chosen script to False as depicted in Figure 21. The logs will now be successfully stored in the following location of the database: C:\Documents and Settings\All Users\Application Data\Itexis\JobQ\M1\XWCF_Logs

    Note:

    The logs will not be stored in your desired location immediately after the Savelogondatabase option is set to False. Instead, the script should be played back once successfully and from the next execution of the script, the logs will be stored in the chosen location which could then be used for client emulation.

  23. The script that is generated using the AppsMon for Windows, will be integrated with the eG client emulation tool using the path of the Log and Script files. The eG client emulation tool checks the Response time and Availability of the component and reports to the client. The integration of the AppsMon for Windows to work with eG is explained in detail in the following sections.