Table of contents
1.
Introduction
2.
Installing LoadUI agent Application
2.1.
Installation
2.2.
Configuration
3.
Network Access and Proxy configuration
3.1.
Setting Up Agents:
3.2.
Configuring Agent Port:
3.3.
Setting Outside Local Network
4.
Using Command Line (Console) for installing LoadUI agent 
4.1.
Using Command Line
4.2.
Silent Installation
4.3.
Getting the Installation Instructions File
5.
Using Command Line (Console) for Checking Agent Availability 
5.1.
Location
5.2.
Syntax
5.3.
Arguments
5.4.
Results
6.
Frequently Asked Questions 
6.1.
What is ReadyAPI?
6.2.
How can ReadyAPI be used in load testing?
6.3.
What is Load Testing?
7.
Conclusion
Last Updated: Mar 27, 2024

How to install and configure Load Test Agents in Ready API?

Author Anmol Punetha
0 upvote

Introduction

Smartbear ReadyAPI

 

ReadyAPI is an API testing platform. It is designed especially for development teams and allows them to automate tests across different API types. It does not require much code in testing and helps accelerate API quality for Agile and DevOps software teams. It also allows running compatible load tests against our functional tests.

Now let's try to see how we can install and configure load agents.

Also See, Types of Agents in Artificial Intelligence.

Installing LoadUI agent Application

Installation

If you have to install the LoadUI agent application, you need to perform the following steps.

  1. Go to the SmartBear website and download the installer. Then run it after copying it to the remote computer.
  2. After that, simply follow the instructions of the installation wizard.

 

After you have completed the installation, open the installation directory and start the agent. The LoadUI agent application must run for ReadyAPI to run tests on this agent.

Configuration

Here, you need to adjust the available memory. By default, the LoadUI agent in ReadyAPI uses 4GB of memory on 64-bit systems. However, it uses 900MB on the 32-bit systems.

There can be issues with low-end systems when your computer has less than 8GB of RAM in 64-bit systems and 1.5GB in 32. To avoid them, the agent uses half of the available memory. 

If you need access to more RAM for large load tests, you can do the following:
 

  • Using the loaduiagent batch file (.bat or .sh): Search and set the desired limit for the comment LOADUI_AGENT_RAM_LIMIT parameter. Remember to uncomment it.
  • Using LoadUIAgent-3.41.0 executable: Set the –Xmx value after opening the LoadUIAgent-3.41.0.vmoptions file.

 

How can you change the agent settings?

Thinking GIF

 

The load tests are run the same way by the agents on the local computer. If one needs to modify the agent's settings, copy the readyapi-settings.xml file to the user folder on the agent computer. The <User directory>/.readyapi folder stores this file on any computer with ReadyAPI installed.

If you want to modify the maximum number of threads on the computer, change the <con:setting id="UISettings@maxThreads">1000</con:setting> value.

Network Access and Proxy configuration

Setting Up Agents:

To use an Agent, it is to be prepared for load testing:

Firstly, install the LoadUI agent application.

After that, open a port on the Agent and on your local computer. This port is used by the LoadUI agent application to communicate with ReadyAPI. It may also communicate with the tested web servers. Make sure to allow traffic through ports in case you use a firewall.

Configuring Agent Port:

To change the agent port:

# If you use the .exe file, add the following line in the <LoadUIAgent>\bin\LoadUIAgent-3.41.0.vmoptions file. You can do this in any text editor:
# This line configures connection port
-Dloadui.control.port=1991

 

# If you use the .bat file, add the set JAVA_OPTS line to it:
set JAVA_OPTS=Xms128m -Xmx1000m -Dsoapui.properties=soapui.properties -Dgroovy.source.encoding=iso-8859-1 "-Dsoapui.home=%LOADUI_AGENT_HOME%" -Dloadui.control.port=1991

You also need to specify the port that you will use to connect to the Agent.

Setting Outside Local Network

Suppose some virtual users belong to a network outside the local one. Then to simulate them:

  1. The port used for the connection needs to be configured in port forwarding.
  2. Make sure to allow traffic through ports, in case you use a firewall.

Using Command Line (Console) for installing LoadUI agent 

Using Command Line

If you are using the command line and you have to install the LoadUI agent application from it, so for that first download the installer. Copy it to the remote computer. Finally, run it with the -c argument:

<LoadUIAgent-3.41.0.sh> -c

 

Silent Installation

The -q argument is used to install LoadUI agent in silent mode.

<LoadUIAgent-3.41.0.sh> -q
<LoadUIAgent-3.41.0.exe> -q

 

In silent mode, the installation usually runs without user interaction. It uses default values for all options.

Getting the Installation Instructions File

If you wish to generate a file with installation instructions, you first need to install LoadUI agent manually. Then the response.varfile file will be created in the LoadUIAgent.install4j directory, containing installer variables that can be edited if necessary.

 

Read about Batch Operating System here.

Using Command Line (Console) for Checking Agent Availability 

Running load tests across multiple agents, using the command line,  makes it difficult to track what agents are available. ReadyAPI has the agentavailability command-line tool. It helps you to use the command line to run load tests across multiple agents where keeping track of the availability of agents is difficult.

Location

The tool is located in the <ReadyAPI>/bin directory. The file name is agentavailability.bat (Windows) or agentavailability.sh (Linux and macOS).

Syntax

The command line has the following syntax:

agentavailability.bat [-a <list of agents>] [-f <file with list of agents>]

Arguments

 

-a <args>, or --agent_availability <args>

It specifies the remote agents to be checked for availability. To specify agents, use the following syntax:

-a <ip>:<port>[, <ip>:<port>[, <ip>:<port>...]]
  • ip – An IP address or computer name of the agent.
  • port – The port number to be used.

Example:
 

-a "127.46.44.12:80", "loadui-agent-17:6645", "loadui-agent-18:6645"
-f <args>, or --agent_name_file <args>

It specifies the file that contains a list of remote agents to be checked for availability. To specify the file, use the following syntax:

-f <file path>

Example:

-f "c:\work\loadtesting\agents\list.txt"

In the file, list the agent addresses separated by commas. Do not use spaces:

<ip>:<port>[,<ip>:<port>[,<ip>:<port>...]]

Results

There are mainly three possible statuses of the list returned by the tool after you send the command. They can be:

  • idle – Here, no scenario is running, so the agent is detected.
  • running – The agent is busy running a scenario. Here also, it is detected.
  • not available – No agent was detected at this address and on this port.

Frequently Asked Questions 

What is ReadyAPI?

ReadyAPI is an API testing platform used by development teams, allowing them to execute functional, performance, and security tests in a centralized interface.

How can ReadyAPI be used in load testing?

ReadyAPI can be used for load testing by using functional test cases to reproduce enormous loads on the website being tested.

What is Load Testing?

Load Testing is a software testing technique in which the completion of a software application is tested under a particular expected load.

Conclusion

With this, we saw the installation and configuration of load test agents in Ready API. I hope that the blog was informative.

See Basics of C++ with Data StructureDBMSOperating System by Coding Ninjas, and keep practicing on our platform Coding Ninjas Studio.

If you think you are ready for the tech giants company, check out the mock test series on code studio.

You can also refer to our Guided Path on Coding Ninjas Studio to upskill yourself in domains like Data Structures and AlgorithmsCompetitive ProgrammingAptitude, and many more! You can also prepare for tech giants companies like Amazon, Microsoft, Uber, etc., by looking for the questions asked by them in recent interviews. If you want to prepare for placements, refer to the interview bundle. If you are nervous about your interviews, you can see interview experiences to get ideas about these companies' questions.

Nevertheless, you may consider our premium courses to give your career an edge over others!

Do upvote our blogs if you find them helpful and engaging!

Happy Learning!

 

Thank you image

 

Live masterclass