Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
🥨 Introduction 
2.
🥨 Testing Conditions 
3.
🥨 Testing Strategies 
3.1.
🗻  Default Testing 
3.2.
🗻 Baseline Testing 
3.3.
🗻 Peak Testing 
3.4.
🗻 Stress Testing 
3.5.
🗻 Soak Testing 
3.6.
🗻 Spike Testing 
3.7.
🗻 Smoke Testing 
4.
🥨 Summary of Testing Strategies
5.
 
6.
 
7.
 
8.
 
9.
 
10.
 
11.
 
12.
Frequently Asked Questions
12.1.
What is Ready API testing?
12.2.
What are the types of load testing in Ready API?
12.3.
What are the different parameters required for testing?
12.4.
What is the difference between Stress Testing and Soak Testing?
13.
Conclusion
Last Updated: Mar 27, 2024

Load Testing Templates in Ready API

Author Rashi
0 upvote

🥨 Introduction 

ReadyAPI provides a quick way to configure our load test using templates for a load testing scenario. Templates are based on popular load testing scenarios and provide basic settings fitting these scenarios.

Load Testing Templates in Ready API

🥨 Testing Conditions 

When load testing a web server, we need to use different load conditions to see how it handles them. 
 

  • What is the maximum number of users the server can support?
     
  • How long can users utilize the server before it needs to restart?
     
  • What happens if numerous users use the server for an extended period of time?
     
  • What happens if a sudden spike is there in users that the server is unable to handle?
     

🥨 Testing Strategies 

The frequently applied load testing techniques listed below can assist you in determining the solutions to above issues:

Load Testing Templates in Ready api

🗻  Default Testing 

Create a default load test if you only want to create a simple load test that you can later configure.

To create basic load tests, use the default load test template. A test will be created with the following parameters:

  • Duration – 10 minutes.
     
  • Load type – VUs.
     
  • Simulated load – 10 virtual users.
     
  • Wait time – One second.
     
  • Warmup time – 15 seconds.
     
  • Assertions – Time taken – Median.

 

🗻 Baseline Testing 

This load testing technique can be used as the main basis for additional load tests or to assess how well your server is performing in comparison to the service-level agreement (SLA).

Your test should assist you in determining the server's typical response. The assertion in other tests can then be set up using these values. Additionally, you might discover issues with the target Test Case or the server that would make longer load tests fail. This is a useful method for determining whether your server performs in accordance with the SLA.

To create baseline tests, we recommend using the Baseline load test template. By default, a test will be created with the following parameters:

  • Duration –10 minutes.
     
  • Load type – VUs.
     
  • Simulated load – 20 virtual users.
     
  • Wait time – One second.
     
  • Warmup time – 15 seconds.
     
  • Assertions –  Time taken – Average,

                         Time taken – Max.
 

  • Created monitors – CPU.
     
  • Created statistics – Two charts are created:

                                → Baseline

                                    TPS

                                    Time taken – Median

                                    Time taken – 95% percentile

                                    Running VU

→ Monitors

                                     Monitor CPU

                                     Monitor Memory.

 

🗻 Peak Testing 

To test how well your server performs during peak usage, use peak testing. Peak testing is comparable to soak testing. However, it is carried out more quickly and with a much higher load.

To create a peak test, use the Peak load test template. By default, a test will be created with the following parameters:

  • Duration – 60 minutes.
     
  • Load type – VUs.
     
  • Simulated load – Ramp Sequence, from 0 to the number of VUs defined by the user, 5 minute ramp up, 50 minute peak time, 5 minute ramp down.
     
  • Wait time – One second (500 ms for trial users).
     
  • Warmup time – 10 seconds.
     
  • Assertions –  Time taken – Average;

                          Time taken – Max;

                          Assertion failures – Per Second;

 

🗻 Stress Testing 

To determine the maximum number of users the server can support, stress testing involves simulating a heavy load on the server. This number is also called a crash point.

Using the Stress load test template, you can quickly create a stress load test. By default, a test will be created with the following parameters:

  • Duration – 120 minutes.
     
  • Load type – Rate.
     
  • Simulated load – Ramp Up, from 0 to the maximum number of arriving users per second supported by license.
     
  • Think time – 1 second (10 ms for trial users).
     
  • Warmup time – 0 seconds.
     
  • Assertions – Time taken – Average;

Running VU;

Assertion failures – Per Second;

 

🗻 Soak Testing 

Soak testing is used to identify problems, such as server memory leaks, that arise during prolonged server use.

The server performance should ideally be the same at the end of a test run as it was at the start. The server code may have problems as indicated by the performance decline.

To create baseline tests, we recommend using the Baseline load test template. By default, a test will be created with the following parameters:

  • Duration – 24 hours.
     
  • Load type – VUs.
     
  • Simulated load – Fixed, 50 virtual users (25 for trial users).
     
  • Wait time – One second (100 ms for trial users).
     
  • Warmup time – 15 seconds.
     
  • Assertions –  Time taken – Average;

Time taken – Max;

Assertion failures – Per Second;

 

🗻 Spike Testing 

Use the Burst load profile to create a spike test. It helps us to simulate a short burst of our users well above the expected maximum load. To check how the spike in the server is handled, in parallel, run another load test to check how the server handled the spike. By default, a test will be created with the following parameters:

  • Duration – 20 minutes, burst load spikes every three minutes for one minute.
     
  • Load type – VUs.
     
  • Simulated load – 10 virtual users base, 100 virtual users during burst.
     
  • Wait time – One second.
     
  • Warmup time – 10 seconds.
     
  • Assertions –  Failures – Per second;

Time taken – Average;

Time taken – Max;
 

  • Created monitors – Default metrics for the created monitor.
     
  • Created statistics – Failures – Per second;

Time taken – Average;

Time taken – Max;

Running VUs;

 

🗻 Smoke Testing 

To ensure that both your server and the test run smoothly, use this load testing strategy.

You carry out this load test to get ready for future load testing. In contrast to the Baseline test, you only want to ensure that there are no errors; you don't want to meet the SLA.

To create smoke tests, we recommend using the Smoke load test template. By default, a test will be created with the following parameters:

  • Duration – 30 minutes.
     
  • Load type – VUs.
     
  • Simulated load – Five virtual users.
     
  • Wait time – One second.
     
  • Warmup time – 10 seconds.
     
  • Assertions – Failures – Total.
     
  • Created monitors – None.
     
  • Created statistics –  Time taken – Average

Failures – Per second

Running VUs

🥨 Summary of Testing Strategies

A summary of the different load testing templates in Ready API is given below:

Testing Strategy 

Description 

Default Testing 

Using the service's default load parameters for testing.

Baseline Testing 

Creating a baseline for future tests and determining whether your server can handle an expected load.

Peak Testing 

Determining how your server responds to the increase in load during rush hours.

Stress Testing 

Determining the maximum load that your server can support.

Soak Testing 

Determining the maximum amount of time your server can function without interruption.

Spike Testing 

Determining whether your server can handle a momentary, high-load spike.

Smoke Testing 

Determining whether your test is properly set up and your server responds to requests.

 

 

 

 

 

 

 

Frequently Asked Questions

What is Ready API testing?

Ready API provides a quick way to configure our load test using templates for a load testing scenario. 

What are the types of load testing in Ready API?

Default Testing, Baseline Testing, Peak Testing, Stress Testing, Soak Testing, Spike Testing, and Smoke Testing are the different types of load testing templates in Ready API.

What are the different parameters required for testing?

Duration, Load type, Simulated load, Wait time, Warmup time, and Assertions are some of the main parameters required for testing. 

What is the difference between Stress Testing and Soak Testing?

Stress testing focuses on determining the maximum load your server can support, whereas soak testing determines the maximum amount of time your server can function without interruption.

Conclusion

In this article, we have thoroughly discussed what Ready API testing is and the conditions leading to such testing. Moreover, we went through every type of load testing template in Ready API and discussed it in detail about them.

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