💫Introduction
Ready API allows us to develop and run load or performance tests. It is to ensure that our APIs can handle many visitors. Load tests can be done locally or distributed across several computers, including cloud machines.
This article will discuss Tutorials and Samples for Performance Testing in the Ready API. You will learn to use Ready API to create, amend, and run load tests, along with tutorials.

✨See how it works

💫Creating Your First Load Test
We'll first go over the Load Test editor interface. It will show users how to design load tests in Ready API. This tutorial describes "how to create a Load Project in Ready API," perform a short test, and examine the results. The exam is a simulation of the sample functional test.
Here we start our Tutorials and Samples for Performance Testing in the Ready API:
✨ Create a New Load Test
To construct a load test with Ready API, follow these steps:
Step 1: Choose File > New Load Test.
Step 2: Choose the URL.
Step 3: Choose POST from the drop-down option, then input https://petstore.swagger.io/v2/pet URL and click Next.
Step 4: Click Configure Load Test after selecting the Default template.
Step 5: Set the Maximum response time to 300 and click Finish.
Step 6: Ready API will generate the test and present users with the options to Run Load Test or Add Local or Cloud Agent. Users can exit the window to change the load test before running it. This tutorial will close the window and make changes to the test before running it.

✨Load Test Editor Interface Overview
In this step of Tutorials and Samples for Performance Testing in the Ready API, users use the Load Test editor to view, amend, and perform load tests. Here's an example of the Load Test editor:

🎭Load Test Editor Toolbar
The test duration configures in the editor's toolbar. Ready API will imitate requests to the target web application until the timeout reaches or the test terminates for any other reason. If no timeout is provided, users must manually complete the test.
-
The progress bar at the front of the editor displays the status of the test run.
- The Running field shows the number of virtual users that are presently in use as well as the maximum number of virtual users that are accessible.
✨ Run the Created Load Test
A freshly formed load test will use the template settings we chose by default.
-
Enter 1 in the load time field to adjust the test duration.
-
Because it takes time to initiate the necessary operations, the results of the initial seconds do not accurately reflect how the server reacts to requests. We shall set the test warm-up period to prevent capturing these findings.
To access the Load Test editor, click somewhere in the Scenarios panel. Enter 5 seconds in the Warm-up Time area.
-
Click ▶ to run the test.
The test is without any user participation. Ready API simulates the underlying functional test case's test phases (we can see its name in the Targets section in the Editor). It sends requests to and receives responses from the target web service. The test results will be available once we start the test. Ready API displays the test results both during and after the test run.
When the test finishes, Ready API presents the Confirmation window, which suggests that users check for mistakes, submit a report, or analyze statistics. We'll do it manually in this lesson, so shut the dialogue.

✨ View Test Results
Ready API collects data on service performance when executing a load test. The collected data can be viewed in the Global Metrics graph, the Test Step Metrics table, and the Statistics page.
The Global Metrics graph depicts the evolution of several performance metrics of our chosen web service over time. To determine how our target service works, look at the VUs/s (the number of users arriving at the server every second), TPS (transactions per second), Time taken (time taken for every request), and BPS (bytes per second) metrics.
Ready API displays a notification underneath the Global Metrics graph if a problem occurs during the test. On the Performance Log tab, click the message to see a detailed error description.
The Test Step Metrics table contains individual test step performance values, such as the maximum and lowest time it requires to simulate each of them.
Switch to the Statistics page to view and compare other statistics from our test runs (this requires a Ready API Performance license).

✨ Modify Load Tests
Users have run their first load test successfully. Let's try a new load profile again and tweak specific parameters.
-
Navigate to the Load Test editor's Load page.
-
Select VUs from the Load Type drop-down menu (simulate user behavior). When this load type is chosen, the load profile parameters indicate the number of virtual users who can work concurrently.
-
Select the loading scenario. The scenario editor displays on the right-hand side.
-
Select the Burst profile from the Load profile drop-down selection. It simulates the varying load during the test run, as indicated by the profile icon.
-
Enter the minimum amount of virtual users to be simulated in Base VUs, for example, five users.
-
The Burst VUs value shows the maximum of virtual users that simulates. The load test settings determine it. Increase the overall number of VUs or the percentage of VUs that this scenario occupies.
Because we only have one scenario in our tutorial, it requires all of the virtual users. Set the VUs parameter to, say, ten users.
-
Enter the time in the Base duration that Ready API will simulate the minimal number of virtual users, for example, 1 second.
-
Enter the time in seconds that Ready API will simulate the highest number of virtual users in Burst duration.
-
Specify the time Ready API should delay before resuming the test for every virtual user in Wait time, for instance, 1 second.
Why is restarting required? When a virtual user's simulation is complete, the number of concurrent users reduces. If this number is fewer than the number attempted by the profile, Ready API creates a new virtual user to meet the required number.
-
Run the test.
Ready API will increase the number of virtual users during the test run until the set most considerable amount reaches. Then, Ready API will reduce the number of virtual users, increase it again, and so on until the test completes.
- Examine the test results to discover how our target web service performance changes the load.

✨ Add Assertions to Load Tests
Assertions are validation criteria that apply to test results to determine how well our target web service operates during a test run.
Now, we'll write an assertion to ensure that the mean simulation time of a single test step does not surpass a predefined time limit:
-
Expand the test case and select the Response element of the test step to verify. The Request editor will appear.
-
Click➕ in the Request inspector's Assertions section.
-
Select the Time Taken statistics and the Median measure from the drop-down boxes in the ensuing Add Assertion dialogue.
-
Configure the following assertion parameters:
-
Enter the time limit the test step performance can take on average in the Maximum edit box.
-
Set the highest number of times the statement must trigger without logging an error in the Tolerance section.
-
Enter the time limit the test step performance can take on average in the Maximum edit box.
-
Select OK. The assertion will be added to our load test by Ready API.
- Repeat the test. Ready API will report errors if the replies take too long. Examine the declaration errors in the Global Metrics graph and Test Step Metrics table.




