Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
🌈Introduction
2.
🌈Create a New load test in Ready API - Using Templates
2.1.
Steps for Creating new load test in Ready API - Using Templates
3.
🌈Create a New load test in Ready API - Manually
3.1.
💧From a Functional Test Case
3.1.1.
☂From Functional Tests node 
3.1.2.
☂From Performance Tests node 
3.2.
💧From a Request
3.3.
💧From a URL
4.
Frequently Asked Questions
4.1.
What is load testing?
4.2.
How do we create a new load test in Ready API?
4.3.
How to create a load test in Ready API manually?
4.4.
What are the targets in Create Load Test wizard?
5.
Conclusion
Last Updated: Mar 27, 2024

Create a New load test in Ready API - Templates and Manually

Author Rashi
0 upvote

🌈Introduction

Load testing is essential in the Software Development Lifecycle for several reasons:
 

  • It replicates real-world user scenarios.
     
  • It assesses how normal and peak loads affect an application's performance.
     
  • It saves money by detecting bottlenecks and defects in real-time.
     

Load testing can be accomplished by downloading a series of large files from the internet. Concurrently running multiple applications on a computer or server. A queue of jobs is assigned to a printer. Excessive traffic on a server. Continuously writing and reading data to and from a hard disc.

Create a New load test in Ready API -  Templates and Manually

Ready API imitates a massive load on a tested website or web service using functional test cases. It lets you see how your server performs under load and estimate its limits.

A new load test in Ready API can be created in two ways, which are discussed below:

  1. Using Templates
     
  2. Manually

🌈Create a New load test in Ready API - Using Templates

Using templates, Ready API allows you to configure your load test for a load testing scenario quickly. The templates are based on common load testing scenarios and provide basic settings that correspond to these scenarios. 

Steps for Creating new load test in Ready API - Using Templates

To build a load test using the template:

  • In Ready API, right-click the project and select New LoadUI Test, or click in the toolbar.
     
  • Likewise, you can create a load test using the New Test tile on the Dashboard. To do so, go to the tile and select Load Test.
     
  • Choose a template to use in the New Load Test dialogue. More information about template parameters can be found in the topic about the load testing scenario you intend to use. Select OK.
     
  • The wizard to Create Load Test will appear. Specify the test target in the wizard's first step. There are the following targets available:
     
  • Select a functional test case and build a load test around it.
     
  • Select a request to the API as a single request. Ready API will create a load test and a functional test case with a single test step.
     
  • Enter your API's URL here. Ready API will import it into the project and generate functional and load test cases.
     
  • Enter the load test name on the same page of the wizard. Select Next.
     
  • Set the load simulated by the test on the second page of the wizard. Use the default values if you are unsure. Select Next.
     
  • You can choose a server to monitor on the third page of the wizard. Make certain that your server is prepared for monitoring. If you are unsure what type of server your API is running on, select Skip this step and click Next.
     
  • Configure the test assertions in the wizard's fourth step. Test assertions monitor test execution and trigger when the monitored metrics exceed the specified value. If you are unsure about what each assertion monitors, consult the statistics reference. To start a load test, click Finish.
     
  • Ready API will generate a load test based on the template you've chosen.

🌈Create a New load test in Ready API - Manually

A load test in Ready API can be created from a test case, an API request, or a URL.

Create a New load test in Ready API -  Templates and Manually

💧From a Functional Test Case

In most cases, you'd want to run a test that simulates a complex test case. After creating the complex functional test, you simulate multiple users performing actions against your server.

☂From Functional Tests node
 

  • Create a load test by right-clicking a test case and choosing Create Load Test.
     
  • In the resulting dialogue, type the name of the load test and press OK.
     

☂From Performance Tests node
 

  • Create a load test by right-clicking the Performance Tests node and selecting Create Load Test, or by clicking in the toolbar.
     
  • Switch to the Manual tab in the New Load Test dialogue and select the Test case option.
     
  • Enter a name for the new test and choose a test case.
     
  • Select OK.
     

Ready API will create a load test based on the selected test case.

💧From a Request

You can create a test from one single request if you only need to test whether the server responds to specific requests. A functional test case will be generated automatically in this case.
 

  • In Ready API, right-click the project and select Create Load Test, or click in the toolbar.
     
  • Switch to the Manual tab in the New Load Test dialogue and select the Single request option.
     
  • Select the request for which the load test will be created, give the new test a name, and then click OK.
     

Ready API will first create a new functional test that matches the request, followed by a new load test.

💧From a URL

You can test REST API without adding it to the Ready API Test project by creating a load test directly from a URL:
 

  • In Ready API, right-click the project and select Create Load Test, or click in the toolbar.
     
  • Switch to the Manual tab in the New Load Test dialogue and select the URL option.
     
  • Enter the new test's name and the target URL.
     
  • Select OK.
     

Ready API will generate a REST request based on the URL, then generate a new functional test with a REST Request test step, and finally generate a load test.

Frequently Asked Questions

What is load testing?

Load testing is important in the Software Development Lifecycle because it simulates real user scenarios, evaluates how the performance of an application can be affected by normal and peak loads, helps save money by identifying bottlenecks and defects on time.

How do we create a new load test in Ready API?

Load test in Ready API can be created either by using templates or manually creating the conditions.

How to create a load test in Ready API manually?

In Ready API, you can create a new load test from a test case, an API request, or a URL.

What are the targets in Create Load Test wizard?

Select a functional test case and build a load test around it. Select a request to the API as a single request. Ready API will create a load test and a functional test case with a single test step. Enter your API's URL here. Ready API will import it into the project and generate functional and load test cases.

Conclusion

In this article,  we have thoroughly discussed what load testing is, where it is used, and what ready API testing is.  Moreover, we went through the two main ways to create a new load test in Ready API: by using a template or manually.

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

Happy Learning!

Live masterclass