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:
- The port used for the connection needs to be configured in port forwarding.
- 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 Structure, DBMS, Operating 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 Algorithms, Competitive Programming, Aptitude, 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!