Getting Started with Distribution

User rating:
3.8 (11 ratings)

One of the most powerful features of LoadUI is the ability to distribute a Virtual User Scenario to agents, to better model the type of load that the system you are testing can expect.
Distribution is only available in LoadUI Pro. So it is recommended that you download a free trial of LoadUI Pro before starting this tutorial.


Try the full experience of Pro:

I this tutorial, we will learn how to:

  1. Create a VU Scenario.
  2. Place that VU Scenario on an agent.
  3. View chart lines grouped by agents.

Before doing this tutorial, make sure that you have an agent running, are familiar with the basics of LoadUI and are familiar with the Statistics Workbench.

1. Video Tutorial



2. Text tutorial

2.1. Connecting to an agent

Start by closing any opened project to get to the Workspace View. Add an agent by dragging the New Agent icon to the Agents list.

createAgent1

The new agent dialog that will appear lets you type URL to an agent machine — or check agents in the list of detected agents in your local network.

createAgent2

2.2. Creating a Scenario

To have something to distribute to agents, you need to create a Virtual User Scenario. A Scenario is simply a component that can contain other components, and be distributed to agents.

Drag the VU Scenario icon from the Components Toolbar to create a Scenario, and then double click its black area to edit its contents.

openScenario

A Scenario is like a miniature project; it has its own collection of components, execution settings, etc. Scenarios are edited in the Scenario View.

closeScenario3

You can tell that you are in fact editing a Scenario by looking at the number of stacked bars (1_snag_evi and 2_snag_evi). Create a Fixed Rate Generator and a Web Page Runner and connect the two. Return to the Project View by closing the Scenario view 3_snag_evi. Your Scenario will now look like this:

vu_scenario

2.3. Distributing a Scenario

A VU Scenario can be run locally, without any agents; but that is not what you are here for!

Expand the Distribution bottom panel. You will see a toolbox containing all the Scenarios in the current project. To distribute your Scenario, just drag it from the toolbox to your agent:

deploy_scenario

In this tutorial, we will distribute our simple VU Scenario to two agents.

Change running mode by using the drop down next to the play button:

distribution_selector_selectAgents

It is time to start your test! Hit play and create a chart for the Web Page Runner in the Statistics Workbench. You can now see sub charts from each individual agent by toggling the Agents panel (click 1_snag_evi).

expandChartsByAgents

Remember that each agent is running a complete copy of the Scenario; this means that the total load will be higher. For example, we can see above that both agents are hitting the web server at 10 TPS (Transactions Per Second) each, resulting in a 20 TPS total load on the server.


.

Note:

LoadUI will stay in distributed mode until you switch back to local mode. Try to keep this in mind as it might otherwise cause confusion the next time you run a test.

.

Tip:

To maximize the load, run the LoadUI controller in command line mode.