当前位置:网站首页>After getting these performance test decomposition operations, your test path will be more smooth
After getting these performance test decomposition operations, your test path will be more smooth
2022-06-30 05:38:00 【School leader】
Previously, there was a live broadcast of the test group built by ourselves to share some basic content of performance testing , At that time, some people said that they hoped to have a practical sharing , After thinking about it, some things belong to company secrets, which are not convenient for direct live sharing ,
Here is an example of a performance test I have done recently , Understanding first ...
Let's take a look at a perfect performance testing process , Here's the picture :
Of course , It is difficult to realize this perfect process in actual work , The following highlights ...
One 、 Get test requirements
I received such a performance test request last Wednesday , The general business logic is shown in the figure below :
Briefly summarize the business logic , Namely : Start a group , Others click on the activity to go in , Collect coupons , Then verify the effectiveness of the group when receiving the coupons , When you pay for a coupon , Verify whether you are a member first , If not , Register your membership first , Then bind the coupon to the member !
The specific performance indicators are : Verify the above figure 4 Interfaces in three scenarios , When the response time is 3S and 5S when , Server's TPS value ( This belongs to the application field of system performance capability verification ).
System tested , It is the company's wechat membership system , Relatively familiar with the system architecture , There is not much here .
Two 、 Test plan and scheme
The so-called test plan , It is nothing more than how long it takes someone to accomplish something with what resources and methods .
Because this performance test requires a small amount of work , And enough time , So I did most of the testing alone , Of course , Some need development assistance .
Test plan , It is the supplement and extension of the test plan .
For example, this performance test , I expect to finish these tests in a week , Design use cases 、 Scene modeling 、 Prepare test data 、 Test script development 、 How long does it take to set up the environment , On which day, even in the morning or in the afternoon, do these tasks .
3、 ... and 、 Preparation before execution
Environment building : The test environment has been tested for the performance of the member system before , The workload of setting up the test environment is small , Development is quickly configured , So I won't repeat it here .
Scene modeling : Personal understanding , It is to consider which scenarios may have performance bottlenecks , Set the corresponding test script and test logic , To simulate the production environment as much as possible ( Because I am familiar with the business , I won't repeat it here , One thing to mention is :
Be sure to understand 、 Familiar with system business , Because demand arises , Is the user + scene ).
Test data preparation : There are two common ways to prepare test data : Make a copy of the production data 、 Development script embeds data ( But either way , Be sure to pay attention to data isolation , Prevent data pollution ).
Test script development : First , You need to get the development interface document and database table design document from the development .
then , Debug the interface through tools or write test scripts , First, ensure that the interface can be called successfully ( The tool I use is jmeter+MySQL).
Four 、 Execute test script
After ensuring that the interface can be called successfully , Perform single interface benchmark test first , namely : Pressure test an interface , Keep pressurizing , Until the response time reaches or exceeds the target , Observe the current concurrent number and TPS.
Personal experience is the same number of concurrent , Do it a few more times , Get an average or stable value ( namely TPS and TRT The relatively stable value of the curve ), And write it down .
Here's the picture :
The purpose of the record , Through intuitive data changes , Get the maximum of a single interface TPS And the change of response time under different concurrency .
PS: I remember reading a book a few days ago :80% Performance bottlenecks can be analyzed TPS and TRT The numerical change of ( Although a little one-sided , But it's also a way ).
For example, according to the numerical changes recorded in the above figure , Obviously, the performance of the coupon interface is very poor , At this time, you can tell the developer , By looking at log、 Check code 、SQL Statement and other methods to query the reason ( Of course, if you have enough personal ability , These can be done by yourself ).
5、 ... and 、 Monitoring and debugging
jmeter The performance test tool itself uses the listener component to provide a certain number of listening value reporting components , But after all, open source tools , Its own components are not powerful enough , You can download support jmeter Enhanced plug-ins to monitor .
jmeter Plug in download address :https://jmeter-plugins.org/
After downloading, you can unzip , take plugins-manager.jar Put in jmeter The installation directory lib/exe, And then restart jmeter that will do .
You can check whether the installation is successful by clicking the button circled in the figure below :
Whether it is server resource utilization or test data report generation , even to the extent that TPS、TRT And so on , The plug-ins provide component support , Please find out how to use it ...
The so-called monitoring and debugging , It's a process of constant adjustment and repetition , This needs to be done according to the purpose of the performance test , Application domain to determine how to execute ...
6、 ... and 、 Final report
Follow the steps above , Get test results , Analyze the bottleneck of the system , Then use various methods to put forward solutions or optimization suggestions , Finally, a complete summary of this performance test , such , The one-time energy test is completed .
In the whole process , It takes a long time to prepare test data and test execution 、 Monitor the tuning phase .
Source of the article : The Internet The copyright belongs to the original author
The above is not for commercial purposes , If it involves intellectual property , Please contact Xiaobian , We will deal with it immediately
边栏推荐
- Sound network, standing in the "soil" of the Internet of things
- 声网,站在物联网的“土壤”里
- 如何制作CSR(Certificate Signing Request)文件?
- 图扑软件基于钻孔数据的三维地质模型可视化
- Xi'an Jiaotong 21st autumn economics online homework answer sheet (III) [standard answer]
- [typescript] defines the return value type of promise
- Who is promoting the new inflection point of audio and video industry in 2022?
- How to automatically renew a token after it expires?
- 【LeetCode】Easy | 232. Using stack to realize queue (pure C manual tearing stack)
- Sword finger offer 29 Print matrix clockwise
猜你喜欢

What do you think of the deleted chat records? How to restore the deleted chat records on wechat?

The fourth day of learning C language for Asian people

剑指 Offer 18. 删除链表的节点

Why can transformer break into the CV world and kill CNN?

Unity shader flat shadow

pytorch中常用损失函数总结

Summary of common loss functions in pytorch

Transfer the token on the matic-erc20 network to the matic polygon

Delete the repeating elements in the sorting list (simple questions)

Solitidy - fallback 回退函数 - 2种触发执行方式
随机推荐
Do you know how to show the health code in only 2 steps
Responding with flow layout
Xctf--Web--Challenge--area Wp
C. Divan and bitwise operations
Bessel curve with n control points
How to use js to control the scroll bar of moving div
Visualization of 3D geological model based on borehole data by map flapping software
El table lazy load refresh
Revit Secondary Development - - Project use Panel features not opened
Use of OpenCL thread algebra library viennacl
How to judge the quality of network transformer? What symptom is network filter transformer broken?
uboot通过终端发送‘r‘字符读取ddr内存大小
Another download address for typro
聲網,站在物聯網的“土壤”裏
Detailed explanation of the loss module of mmdet
How to write a thesis
Intellj idea generates jar packages for projects containing external lib to other projects. The method refers to the jar package written by itself
Unity mobile end sliding screen rotation
About modifying dual system default startup item settings
Digital signature——