Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Necessities🚀
3.
Prepare the Project🎯
4.
Add and Configure Agents
5.
Changing the Mode👨‍🏫
6.
Run the test✨
7.
Check Test Results⚡
8.
Creating Cloud Test in Cloud Agents👨‍💻
9.
Requirements🔥
10.
To Add & Configure Agents👩‍💻
11.
Changing the Mode👨‍🏫
12.
Run the test💥
13.
Check test Results🧾
14.
Frequently Asked Questions
14.1.
What is Ready API?
14.2.
What is an API, and why is it used?
14.3.
What are the four types of API?
14.4.
Which Cloud platform is supported by Ready API?
14.5.
What is the data source in Ready API?
15.
Conclusion 
Last Updated: Mar 27, 2024

Creating the Cloud Distributed Tests in Ready API

Author Gunjan Batra
0 upvote

Introduction

This blog will teach how to create Distributed Load Tests in Ready API. In this, you will also learn to run the load test on different computers.

We will also learn how to create your first load test and modify it according to the situation and need.

Cloud test

 Ready API is a REST and SOAP API automation tool. It is an integrated suite of applications for API testing. In functional testing, virtualization, and integration, you will be using Ready API. It is an easy-to-use tool for the development team. It makes the process easy and reliable.

Must Recommended Topic, Types of Agents in Artificial Intelligence.

Necessities🚀

To run the distributed cloud test, you must meet the following conditions.

Require image
  • You should have the pro-Ready API License. You can ask for 14 days of free trial access.
     
  • First installs the LoadUI agent, which should run on the agents. To install it, you can follow the instructions that are mentioned in the wizard, or you can also install it through the common line.
     
  • With the LoadUI agent installed, open the connection port on your computer. By default, The port uses the 1991 port number. If you're using any proxy server, allow the network connection for using that port.
     
  • To simulate the test, ensure network access to the agent

Prepare the Project🎯

To run the project on the test cases, you first need to prepare it. 

You need to clear the Resource root project property, or you can also mention the absolute path. LoadUI Agent has the property that it does not support using ${projectDir} and ${workspaceDir} as the values passed to the parameters. 

Prepare Project
  • Ensure all the external files example, the excel files, are linked to the test, and the paths are mentioned as the absolute path.
     
  • When your project scripts address an external library, mention it in the library <LoadUIAgent>\bin\ext folder.
     
  • Scripts use the workspace object. The Load UI agent does not use the workspace when running the test case. Scripts use the getWorkspace() method, but this method return null. You need to change your script settings, so it does not use the workspace object.
     
  • When your project uses plugins, you need to have those plugins in your agent machines. To do this, copy all those files from <User folder>/.soapui/plugins directory where the Ready API is installed and paste it to <User folder>/.soapui/plugins where you have Load UI agent installed. 

Add and Configure Agents

For adding and configuring the agents, follow the mentioned steps:

1️⃣Switch to the distribution page in the load test editor.

Select the page

2️⃣On the toolbar, click on this symbol.

Add Agent

3️⃣Choose the agent from the detected list and if it is the first agent, select the running state option. Ready API has the feature to show the available agents in their local network. Finally, click Ok.

Running Agent

4️⃣Again, click on this symbol.

⚡For a new agent, you need to select the new agent and provide its IP address. You can also specify the hostname in the host filed area and change the port number for the connection. This method is used when you want to connect to an agent that is not available in the local network. Ready API does not display these names on the list. Finally, click on OK.

⚡When you properly configure the agent, you get the connected symbol. (). When the Ready API is not connected, it shows the sign. ().

Drag the scenarios into the agents. If you have multiple scenarios, Ready API will simulate them simultaneously.

Scenarios Image

Before you start the test, ensure both agents are on. RedayAPI will not simulate the test if the agent is disabled.

Agent Image

You can select and deselect all the agents according to your needs. By checking the checkbox, you have this feature of selecting and deselecting the agents found in the network.

Select the network

You can keep track of the network as it is sorted by name. When the new agent is added, you can check that the list changes automatically according to the name.

Changing the Mode👨‍🏫

Ready API has the feature that it does not run the test automatically. You must change the mode to distribution mode before running the load test case. 

Change the mode

Select Run scenarios on agents from the play button next to play using the drop-down list. 

The test will get loaded into the agents.

Run the test✨

To run the load test, click on this symbol . On both agents, Ready API will simulate the load test.

Check Test Results⚡

To check the test results, you must switch to the statistics page. Add a new statistics group.  

Check Image

You can choose the statistics you want to display from the agent you need. For this, you will be required to select the agent name, and for the overall display of test statistics, you can take the sum of values of all the agents.

Creating Cloud Test in Cloud Agents👨‍💻

In this, we will try to understand how to run the test in the cloud agents. For this, we will be using the public Amazon machine image provided by SmartBear. In case your project uses plugins, ensure to copy those plugins into the agent machine.

📍When your project uses plugins, you need to have those plugins in your agent machines. To do this, copy all those files from <User folder>/.soapui/plugins directory where the Ready API is installed and paste it to <User folder>/.soapui/plugins where you have Load UI agent installed. 

Requirements🔥

🎗You should have the pro-Ready API License. You can ask for 14 days of free trial access.

🎗Amazon is the only cloud service profile supported at this point.

🎗Open the connection port on your computer. By default, The port uses the 1991 port number. If you're using any proxy server, allow the network connection for using that port.

🎗Network access to the cloud is a must for simulating the test.

To Add & Configure Agents👩‍💻

For adding and configuring the agents, follow the mentioned steps:

1️⃣Switch to the distribution page in the load test editor.

Distribution Image

2️⃣On the toolbar, click on this symbol. Click .

Add Agent

Selecting the Add cloud agent, ensure that the Amazon cloud provider is selected, and then click on ➕.

Add the agent

In the credentials dialog box, ensure to give your profile, secret, and access key name. Finally, in the end, click on OK on both the dialogs.

Select the cloud agent that you have created. The cloud agent controller editor will get displayed.

Select the cloud Agent

You need to mention the zone and region of the cloud instance you want to use.

From the image that you have provided to Ready API, it will launch the specified count of cloud instances. You will select the SmartBear Load UI agent, or you can give the custom image.

Cloud Agent Controller

You can also mention the number of agents and type of instance your test will be running on. For your preference in this, we will use ten agents running on the m3.medium instance. This depends upon the users you plan and the complex functional test.  

Cloud Agent Controller

Drag the scenarios into the agents. If you have multiple scenarios, Ready API will simulate them simultaneously.

LoadUI Test

Changing the Mode👨‍🏫

Ready API has the feature that it does not run the test automatically. You must change the mode to distribution mode before running the load test case. 

Change the mode

Select Run scenarios on agents from the play button next to play using the drop-down list. 

The test will get loaded into the agents.

Run the test💥

🔶To start your test, you click on ▶. The Ready API will first show the price check, and once you click on ok to the price check of your test, Ready API will  automatically instantiate the cloud and run  the test on the cloud 

🔶All the data transmitted from Ready API to the cloud is encrypted.

When there is a gap between the test and Ready API and the test is unavailable for some time, the machine automatically terminates the agent.

Check test Results🧾

To check the test results, you must switch to the statistics page. Add a new statistics group. You can select the group from the cloud agent. Select the agent name for displaying the statistics for the cloud agent. For the overall display of test statistics, you can take the sum of values of all the agents.

Frequently Asked Questions

What is Ready API?

Ready API is a REST and SOAP API automation tool. It is an integrated suite of applications for API testing.

What is an API, and why is it used?

API stands for an application programming interface. It is used so that there can be an interaction between the two applications.

What are the four types of API?

Web-based applications commonly use these four types of API. These are named public, partner, composite and private.

Which Cloud platform is supported by Ready API?

Ready API supports the Amazon Web Service cloud platform for loading and creating their test on the cloud.

What is the data source in Ready API?

It is a powerful Ready API tool used to create data-driven test cases. It can take the data from the source and provide it with any test step.

Conclusion 

In this blog, we have discussed cloud distribution in ready API. We have to look at how we can run the test on our local computers and the cloud machines. We have seen the requirements, the configuration, and the test results for the same. We have looked at the insights about the cloud machines' test cases and how Amazon responds to the test.

To learn more about Ready API, please refer to our blogs:

Load and configure load test agents in Ready API

Load testing in Cloud

Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enrol in our courses, refer to the mock test and problems; look at the interview experiences and interview bundle for placement preparations.

Happy Coding!

Live masterclass