Keep the following in mind before you start creating your scenario(s):
>If you install AppLoader suite on a PC, you can launch ScenarioBuilder on the same machine and create your scenario(s) easily. This method will give you the option to run a load test with only one single user.
Tip: Please refer to the AppLoader User Guide document for more information.
>If you install AppLoader suite on a Server and your goal is to run a load test with multiple users, continue following the next sections.
Launch AppLoader Controller
After installing AppLoader, a shortcut will be created on the desktop.
Double-click the AppLoader shortcut to launch the AppLoader Controller in your default browser.
Note: You can also launch the AppLoader Controller by entering the IP address of the Server (or “localhost”) and Web Server Port number into the address bar of a web browser.
Log in to AppLoader (default User Name: admin / Password: admin)
Once you log in, you will notice the Injector has registered itself with the AppLoader Controller.
Note: Ensure that your firewall is not blocking communication to the Controller through web server ports 8888, 9001, and 9002.
Tip: If the Injector does not appear on the “Manage Injectors” page, run the “Start Injector” program from the Injector machine:
[Start> All Programs> Injector> Start Injector]
Starting rUsers is the first step in preparing a test. This process launches rUserManager on the Injector and initiates the rUsers logins.
Note: rUsers are the “real user” accounts which exist in the Windows environment and are administered through AppLoader.
Click the “Start rUsers” button. The “Start rUsers” window pops up;
Number of Users: Specify the number of users to start on the selected Injector.
Start Index: Specify the numerical index from where the users will be launched. For Injectors using CSV files, this is the line number in the CSV file.
Launch Delay: Specify a launch delay in seconds. The system waits this amount of time after starting each rUser.
Click “Submit” to start rUsers.
Started rUsers can be viewed in the “Real Time” page of the Controller.
Tip: Starting rUsers for the first time can be resource intensive as the server is creating each rUser environment. It is recommended to use a “launch delay” value of 30 seconds to avoid overloading the Injector server when starting rUsers for the first time.
Once you start the rUsers, rUserManager will automatically start.
rUserManager is part of the Injector component that is used to oversee the rUsers during Scenario playback. It enables RDP connections to the rUsers.
Tip: If rUsers are not created, make sure that the password meets the requirements for the Windows machine hosting the Injector. For example, Windows Server 2008 requires passwords to include characters from three of the following four categories: Upper Case, Lower Case, Base-10 Digit (0 through 9), and Non-alphabetic (i.e. !, $, #, %).
Tip: If rUsers have been created and the rUserManager has opened on the Injector, yet rUsers cannot be started in the rUserManager, there might be an issue with Remote Desktop Connection.
This issue can be solved by adding the “Remote Desktop Services” role to the Server. Please refer to the appropriate “Windows Server Optimization for Injector” document to learn how to properly configure the Server for optimal use as an Injector. You can download it here.
Create a Scenario using ScenarioBuilder
Scenarios are the action sequences which emulate your real user activity within your application. Creating your first scenario is simple. If you know how to use your application, then you know how to create a scenario with ScenarioBuilder.
It is a good practice to create your scenario(s) using one of the rUser's user accounts. The reason for doing this is that by creating the scenario in the environment that the test will run, the differences in scenario creation environment and test environment are minimized. For this purpose, you need to install ScenarioBuilder on the same machine in which the Injector will be installed. Therefore, there will not be any differences between the scenario creation environment and the load testing environment.
Please follow the next steps in order to learn how to create user scenario(s). After you make sure the scenario works fine for one user, you can check how it will work for multiple users under real-life conditions.
In order to start creating your scenario, click the “Maximize” icon in the upper right corner of any rUser session (i.e. rUser001) to maximize that session within the rUserManager.
Double-click the ScenarioBuilder shortcutto launch the splash screen.
When it launches for the first time, ScenarioBuilder will ask you to create a new project.
Enter a project name and click “Create”.
In this example, we want to create a simple scenario that opens Citrix Receiver in a web browser and logs on to Citrix Web Interface with parameterized user name/password. You can see the steps below:
Click “New” from ScenarioBuilder toolbar or click the “New Scenario” from the Splash Screen to create a new scenario.
Name your scenario and click the “Open web app:” button.
Next, enter the proper URL and click “OK”.
ScenarioBuilder will open the URL on the default web browser and start the Scenario Recorder.
After that, click on the textbox to start parameterization of login process using ScenarioRecorder. On Scenario Recorder, click the "Add Variable" button. This allows you to add a new variable or choose a variable from a CSV file.
Note: To genuinely replicate real world impact on an application, parameterizing data is critical. In ScenarioBuilder you can access unlimited rows of data values, stored in comma separated values (CSV) files, to make each playback of a Scenario a unique, real-user experience.
Press the Tab key to go to the next textbox;
Finally, click “Log On” button.
These are the recorded actions for our script:
In the edit mode, you can simply add, delete or modify actions wherever necessary.
Note: Add an “On Failure” series of actions to your scenario so it recovers, re-sets and continues in your load test environment. The “On Failure” section determines what actions to take in the event your Scenario or component fails, and should always be located at the end of the scenario or component. A “Resume” action in conjunction with “On Failure” will allow your scenario to pick up where it left off prior to the failure. Note that “On Failure” is an excellent way to handle intermittent pop-ups like security warnings.
Tip: Increase image action Timeout values before sending your scenario to the Controller. The default value of 10 seconds might be sufficient when playing back in ScenarioBuilder, but in your load testing environment resources will be taxed and pages will load more slowly. Recommended Timeout value = 30 or 60.
Here is the final scenario:
Done and done! ScenarioBuilder offers a rich array of Actions to emulate virtually any user activity in your application. Start simple, there’s plenty of time to dig into ScenarioBuilder’s sophisticated feature set.
Important: Note that you can create scenario(s) for any application (e.g. your company's custom application, a web-based app, or even Notepad).