I have a web application that opens a tunnel to Citrix server to open other applications such as word document or Excel spreadsheet. What are best practices to use in order to create my scenario quickly. Thank you.
Let’s say your first scenario is to login to a website that opens a tunnel to Citrix server and your test case consists of the following:
a. Login to the website
b. Launch word document
c. Close word document
d. Log out of the website
Pay attention to the use of the following actions:
a. Define Blocks: Use Define Blocks for deferent sections in your scenario that can be independent from each other. For example “Loging on” to the website can be independent from “Logging out” and “Launching the Word document”.
b. Transactions: Use transactions in meaningful places. Excessive use of transactions can be confusing for your reporting and minimal use will not be sufficient. Transactions are best used around the result of a function; for example, the result of the login function is a “welcome” image or any image that indicates successful login.
c. Favorites section: This section is very useful when need to paste same list of actions in different scenarios. For example, you need to paste the following actions over and over:
KeyboardTypeText(%user%)
KeyboardKeyPress(Tab)
KeyboardTypeText(%password%)
KeyboardKeyPress(Enter)
Then you can create a block and call it Msc and paste those actions inside the block. Then click on the block and add it to favorites. This way you can call those actions anytime in any scenario or block.
d. When to use Keyboard shortcuts
Use keyboard shortcuts anywhere in the application that is possible, as long as you make sure the page where the shortcuts are used is fully loaded. Keyboard shortcut examples are: ctr+o to open a dialog box or alt+F4 for closing the word document.
e. When to use Bitmaps
Make sure to use Bitmaps when you load a new page or screen; this will ensure that the virtual user in sync with its own scenario and will move only if the pages or screens are loaded successfully. You don’t need to use bitmaps many times inside the same page, instead, you can use bitmap once to verify the page successfully loaded then use Anchored mouse move action from that image to move around the page.
f. Web applications: You don’t need to launch IE or any other browser then post the URL. You can simply use OpenWithFileAssociation action under Applications and post your URL directly there to open the website. This will save you lots of time and lines of actions.
g. Desktop applications: You can launch a desktop application by using StartApplication action and post the full path to the executable including any parameters or if you have a shortcut of the application on the desktop then you can use ClickOnImage action to double click on the desktop shortcut.

