☁️Testing a Web Server Using CodeArts PerfTest

Ertugrul Basar
Huawei Developers
Published in
5 min readJul 5, 2023
CodeArts PerfTest

Hello everyone🙌, in today’s session, we will be conducting a demonstration on CodeArts PerfTest, a powerful service for testing web servers. But before we dive into the demo, let me provide you with a brief overview of PerfTest and the server architecture that we will be testing.

🔦Introduction

CodeArts PerfTest is a comprehensive testing tool that allows us to evaluate the performance and reliability of web servers that are built on protocols such as HTTP, HTTPS, TCP, UDP, and more. It provides various features that enable us to simulate real-world scenarios and measure important metrics such as response time, throughput, and more. In our demo, we will be testing a group of web servers that are set up in a specific architecture as you can see in the screenshot below. This architecture consists of multiple servers working together to handle incoming requests and deliver content to users. Through this testing process, we can assess the scalability, resilience, and overall performance of this architecture.

System Architecture

Now that you have an understanding of PerfTest and the server architecture, let’s proceed with the demo and explore the capabilities of this powerful testing tool ⚡️

💻Demo

- Prerequisites

In this demo, we need a web server to test initially. If you haven’t created a system yet or if you’re unsure how to create one on Huawei Cloud, you can learn how to perform these processes using the KooLabs link provided below. KooLabs is a free environment where you can try out the services of Huawei Cloud. It serves as a laboratory where you can experiment with various types of systems and learn from hands-on experience. Alternatively, if you prefer to conduct the test on a different system architecture, you can create a CCE system by following the link provided below. Once you have a functional server, we can proceed with our test.

- Test

PerfTest Dashboard

When we arrive at the PerfTest dashboard, as shown in the screenshot above, you can purchase the packages that determine the maximum number of users that can be used during the test from the upper right part of the screen before starting the process. Since I have already completed this, I will proceed by clicking on “PerfTest Projects” on the left.

PerfTest Projects Page

After navigating to this page, I click on “Create Test Project” and a new tab like this opens below.

Project Creation pop-up

After providing the name of the test project and, if necessary, adding a description, we click on “OK” and the previous page reappears.

Created Test Projects

By clicking on “Test 1,” we can review and modify the properties of the test we are going to perform.

Case Script

In this page we will change the test case scripts.

1️⃣The protocol we want to use in this test (HTTP, HTTPS, TCP, UDP, HLS, RTMP, WebSocket, HTTP-FLV)

2️⃣The request type we want to send (GET, POST, PATCH, PUT, DELETE)

3️⃣Address of the web server we want to send our requests.

4️⃣Timeout interval for the server. You have the option to adjust it from 20ms to 60s.

After making the necessary changes in this section, we can proceed to the Pressure Configuration tab.

Pressure Configuration

In the Pressure Configuration tab, as shown in the screenshot above, PerfTest offers six types of pressure modes. For this test, we will select the ‘Concurrency Mode’ and enable the ‘Gradient Increment’ option. We will start with 20 users and gradually increase the total number of users to 120 over a duration of 6 minutes.

Test Execution

After configuring the script and pressure configuration for the test case, we can proceed to start the test. This can be done by selecting the checkbox next to the test case we have created and clicking on the “Execution” button. This action will open a new tab, as shown below.

Execute pop-up

In this tab, we have the option to modify the name of the task and choose the enterprise project. Once we have made the changes, we can click on “Execution” to start the test.

Test Results

Once the test is completed, we can access the report of the results, as depicted in the provided screenshot. In this section, you can analyze various statistics related to the response time and quality of the tested web servers. For this specific test, we observed a success rate of 96.87% and an average response time of 206.77ms. These metrics provide valuable insights into the performance and reliability of the web servers under the tested conditions. Additionally, there is an option to download the report in PDF format, which is available in the top right corner of the page.

👉Conclusion

In this article, I first provided a brief introduction to CodeArts PerfTest, highlighting its features and benefits. We then proceeded to conduct a demonstration, where we were able to observe the response quality and gather statistical data about our web server architecture. Following the test, we can use the insights gained from the results to make necessary changes on the server side to further optimize performance and enhance user experience.

💁References

--

--