One of the key benefits of loadUI is how easy it is to distribute your LoadTests to multiple machines, allowing you to run large scale tests not possible from a single machine; all you have to is package the desired LoadTest components in a TestCase and then drag-and-drop that on to the desired agents. Lets have a look at the involved components to get you started.
1. The loadUI Agent
The loadUI agent is a seperate executable that you install on all machines that you want to use for distributed load-testing. Once installed and running, you configure agents by adding them in the Workspace View; drag a New Agent from the Component Toolbar on to the list of agents; you will be prompted for the address of the agent as follows:

You can either specify just the IP-number of the agent, or the full https address of the agent which by default uses port 9443 (loadUI uses long-lived http connections to communicate with agents, and also encrypts these by default to avoid exposing sensitive information).
If your agents are running on the same network subnet, loadUI will automatically detect them and show them in the New Agent dialog.

Once added, the agent shows in both the list of Agents and Agents Manager in the System component at the bottom of the loadUI window:

You can add as many agents as you want and also disable/enable specific agents via the "ON/OFF" switch on their top-left.
2. loadUI TestCases
Once you have your agents running and configured you need to create a TestCase that you can deploy and run on them. This is just as straight-forward as everything else in loadUI; in the Project view drag a new TestCase from the Component Toolbar onto the Project Canvas, which will create a TestCase component for you:

A TestCase is like a miniature project; it has its own collection of components, execution settings, etc. Double-click the TestCase to open the TestCase View:

This is similar to the Project View; you have the Component Toolbar to the left, the Execution Toolbar at the top (with a miniature version of the Project Execution Toolbar just above) and a navigator window to the bottom right.
TestCases can contain LoadTest components just like projects; drag the desired components on to the TestCase Canvas and connect them as usual. The main difference is how TestCases are executed, but before we get into that lets have a quick look at the Agent Manager at the bottom of the loadUI window:

To the right (under the Distributed button) you can see all configured agents and which TestCases they are running (none in the above screenshot) and to the left (under the Local button) you see a special Ghost Agent which is used for running TestCases on your local machine. If you are in the TestCase View, the current TestCase will be highlighted on all agents it has been deployed to.
3. TestCase Deployment and Execution
As hinted by the above, loadUI can run TestCases in two modes:
- Local Mode - All TestCases are executed on the local machines, use this when you don't have access to any agents or when you want to try out your TestCases before deploying them
- Distributed Mode - All TestCases are executed on the agents to which they are deployed. Please note that if you are in this mode and haven't deployed a TestCase to an agent nothing will happen when you try to run it.
Switch between them by clicking their corresponding button in the Agent Manager (if any tests are running they will be stopped before the switch). Deploying TestCases to agents can be done in any mode — just drag the TestCase from the Ghost Agent to the desired Agent to the right:

If you are in Distributed Mode and the TestCase is running you will immediately see that the TestCase components start to execute as configured. If you want to deploy a TestCase to multiple agents, just repeat this procedure for each agent (you can also move TestCases between agents by dragging them accordingly). To undeploy a TestCase from an Agent simply drag it back to the Ghost Runner.
When running in distributed mode, remember that each agent is running a complete copy of the TestCase, so if you for example have set the load of a Fixed Rate Generator to 100 req/sec and have deployed it to 5 agents, you will be creating 500 req/sec.
In either mode, you can start and stop the TestCase with its execution toolbar at the top (just like for Projects):

The same execution controls are available on the front of the TestCase component allowing you to control the execution of a TestCase without having to open it:

In this way, multiple TestCases can be executed indepentanly of each other, either all running locally (when in Local Mode) or distributed on agents as configured.
4. Advanced configuration
During installation, you will be asked to set any custom network port that loadUI should use. To change the HTTP and HTTPS network port that a loadUI (agent or the main loadUI application) uses once loadUI is installed, set these command-line options:
-Dloadui.https.port=4711 -Dloadui.http.port=1337
Keep in mind that loadUI uses both HTTP and HTTPS for communicating. The default ports are 8080 and 8443, respectively.




