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.
🥨 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:
🗻 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:
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.
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.