Building a Script File
Let us now begin script building.
- Create a new script named Citrix using steps 1-7 explained in Building a Script File.
- 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.
- 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.
- 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.
- 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.
- 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).
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.
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.
Figure 4 : Capturing the image of the XenDesktop
Clicking on the image above the XenDesktop will lead you to Figure 5.
- Now, open a Notepad application published on the XenDesktop by following the menu sequence: Start->All Programs->Accessories->Notepad (see Figure 5).
To capture the Notepad icon as your next transaction, follow the steps 4- 8 described above (see Figure 7).
- 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.
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 9 : Capturing the image of the drop down icon
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).
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
- 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).
The Exe tree available in the Components section will now host the executable that was just created i.e., Citrix- 1 (see Figure 12).
Figure 13 : The error message that is displayed in the Player window
- 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.
- 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.
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.
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
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.
- 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.