Applies to ReadyAPI 2.7, last modified on June 25, 2019

In this tutorial, we modify a test created using the Creating Your First Load Test tutorial to run it on other computers in your network.

Requirements

To run LoadUI distributed tests, you need the following requirements to be met:

  • The LoadUI Pro license must be active. Feel free to request a trial on our web site.

  • The LoadUI Agent application must be installed and running on Agents. The simplest way is to use the installation file and follow the instructions of the wizard, but you can also install it using the command line.

  • Open the port used for the connection on a computer with LoadUI Agent installed. By default, LoadUI Agent uses port 1991. This port is used to communicate with LoadUI. If you use a proxy or firewall, allow network connections using this port.

  • Make sure that you have network access to the agents that will simulate the test.

Adding and Configuring the Agents

To add and configure the agents:

  • In the load test editor, switch to the Distribution page.

    API distributed load testing with ReadyAPI: The Distribution Page

    Click the image to enlarge it.

  • Click on the toolbar.

    API distributed load testing with ReadyAPI: The Add Agent Button
  • For the first agent, select the Running agent option and choose an agent from the list of detected agents. LoadUI displays all available agents in the local network. Click OK.

    API distributed load testing with ReadyAPI: The Add Agent Dialog
  • Click again.

  • For the second agent, select the New agent option and enter its IP address or host name in the Host field. You can also specify a different port to be used for the connection. You use this method to connect to agents that are not in your local network. LoadUI does not display them on the Running agent list. Click OK

If you configured the agent correctly, it has the connected symbol (). If LoadUI cannot connect to the agent, it has the disconnected symbol ().

  • Now, drag the scenarios into the agents. If you add multiple scenarios, LoadUI will simulate all of them simultaneously.

    API distributed load testing with ReadyAPI: Created Agents

    Click the image to enlarge it.

    Before starting the test, make sure that both agents are enabled. If an agent is disabled, LoadUI will not simulate tests on it.
    API distributed load testing with ReadyAPI: Enabled Agents

Switching to the Distributed Mode

By default, LoadUI does not run tests on agents. You need to switch it to the Distributed Mode before running your load test. To do this, use the drop-down list next to the play button and select Run scenarios on agents. After this, the load test will run on Agents.

API distributed load testing with ReadyAPI: Run Scenarios on Agents

Click the image to enlarge it.

Running the Test

To start the load test, click . LoadUI will start simulating requests on both Agents..

Checking Test Results

Switch to the Statistics page. On this page, add a new statistics group (click or ). When selecting statistics to display, you can choose the statistics from the Agent you need. To display the statistics for the Agent, choose the agent name. To display overall test statistics, choose The sum of values for all agents.

API distributed load testing with ReadyAPI: The Add Statistics Dialog

Click the image to enlarge it.

For details about load test results, see Viewing Test Results.

See Also

Test Assertions
Load Test Agents
Test Results

Highlight search results