Stress Test Report

大智若渔_Smart_Fishpond 团队 2024-12-06 01:55:51
Which course does this assignment belong to2401_Mu_SE_FZU
Where is the requirement for this assignmentFifth Assignment——Alpha Sprint
Team nameSmart Fishpond Access
The goal of this assignment

1. Claim Stress Test Method

2. Conduct Web Stress Test

3. Conduct API Stress Test

Other referencesGoogle Core Web Vitals

 

Content

Stress Test Report

1. Testing method

2. Web stress test

2.1 Test items

2.2 Test steps

2.3 Test parameters

2.4 Test results

3. API stress test

3.1 Test items

3.2 Testing steps

3.3 Testing parameters

3.4 Test results


Stress Test Report

1. Testing method

Stress testing is conducted using the black box testing method. In black box testing, the test object is treated as a "black box", meaning that testers do not consider the logical structure or internal characteristics of the program. Instead, they focus solely on whether the program's functions align with its function description as outlined in the requirements specification. This approach allows testers to simulate real user behaviour without caring the system's coding details. It also enables the evaluation of web page performance under stress, enhances testing efficiency, and ensures that the system can operate reliably in various complex environments. In this report, we utilize testing tools to carry out stress tests on both website and APIs.

2. Web stress test

2.1 Test items

Testing Tool: Apache Benchmark

Taking the homepage of the website, http://softwareproject.moyu-home.cn/index.html, as an example, the testing result is shown below.

2.2 Test steps

Step 1 Create a new request

Open Apache Benchmark and create a new request.

Step 2 Set request parameters

Enter the following command to perform a stress test

ab -n 1000 -c 10 http://softwareproject.moyu-home.cn/index.html

Step 3 Send the request and verify the response

View the results

2.3 Test parameters

Total number of requests: 1000

Concurrency Level: 10

2.4 Test results

img

​Fig. 1 Webpage stress test result

As Fig. 1 shown, during our stress testing of a web page, we utilized Apache Benchmark to conduct 1,000 requests with a concurrency of 10. The test duration was 24.577 seconds, and all requests were successful without any failures. A total of 7,081,000 bytes were transferred, out of which 6,802,000 bytes were HTML content.

The test results indicate that we processed an average of approximately 40.69 requests per second, with an average response time of 245.774 milliseconds. The minimum connection time recorded was 9 milliseconds, the maximum was 1,035 milliseconds, and the average connection time was 24 milliseconds. In analyzing the response times, we found that 50% of requests were completed within 231 milliseconds, 95% were completed within 280 milliseconds, and the longest request took 1,250 milliseconds. Taking Google's Core Web Vitals as a standard for measuring web performance and user experience, the server has demonstrated good performance under this load, showing excellent stability and efficiency.

3. API stress test

3.1 Test items

Testing Tool:ApiPost

Testing InterfaceMethodTest TimeTest ContentTest Personnel
LoginPOST28/11/2024,23:01:32Log in832201313
ChangePOST28/11/2024,23:01:34Forgot password832201313
RegisterPOST28/11/2024,23:03:33Sign in832201313
VerifyPOST28/11/2024,23:03:37Verification code832201313
getDeviceLocation`GET28/11/2024,23:03:39Obtain device location832201313
getWordGET28/11/2024,23:04:07Speech recognition832201313
getAnswerGET28/11/2024,23:04:10Get Response832201313
newDevicePOST28/11/2024,23:04:13Add new device832201313
dataGET28/11/2024,23:04:15Get data832201313
warnLogGET28/11/2024,23:04:20Warning history832201313
pushPOST28/11/2024,23:04:21Upload Data832201313

The result of the getDeviceLocation interface is described here as an example.

3.2 Testing steps

Step 1 Create a new request

Open the postman first, and then input port of the URL in the address bar, for example (http://json.moyu-home.cn/getdevicelocation), select request method (such as GET, POST).

Step 2 Set request parameters

Set the Concurrency Level 100 mode setting to select the press test duration. Set the time to 10s.

Step 3 Send the request and verify the response

Click the Stress Testing button, send the request, and then view the results.

3.3 Testing parameters

img

Fig. 2 Test parameters

Fig. 2 illustrates the parameters setting of this test. Concurrency Level is 10. Test Time is 10s.

3.4 Test results

img

Fig. 3 API stress test result

Fig. 3 indicates that the system processed a total of 1,978 requests within 10 seconds, achieving a 100% success rate. The maximum response time reached 1,037 milliseconds, while the average response time was 492.115 milliseconds. Additionally, 50% of the requests had a response time of less than 469 milliseconds, and 95% of the requests were responded to in under 673 milliseconds.

Overall, the system demonstrates stable performance under high concurrency, with response times generally falling within an acceptable range. However, the response time still has room for optimization, which will be shown in the upcoming beta testing.

 

 

...全文
76 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

170

社区成员

发帖
与我相关
我的任务
社区描述
2401_MU_SE_FZU
软件工程 高校
社区管理员
  • FZU_SE_TeacherL
  • 助教-吴可仪
  • 助教-孔志豪
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧