当前位置:网站首页>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
边栏推荐
- Use of OpenCL thread algebra library viennacl
- Digital signature——
- Revit二次開發---未打開項目使用面板功能
- [Blue Bridge Road -- bug free code] analysis of AT24C02 storage code
- Intellj idea jars projects containing external lib to other project reference methods - jars
- Question mark (?) in Cron expression Use of
- [Motrix] download Baidu cloud files using Motrix
- Unity obtains serial port data
- Promise knowledge points
- El table lazy load refresh
猜你喜欢
14x1.5cm竖向标签有点难,VFP调用BarTender来打印
Digital signature——
9. naive Bayes
Using lazy < t > in C # to realize singleton mode in WPF
[chestnut sugar GIS] global mapper - how to assign the elevation value of the grid to the point
Vfpbs uploads excel and saves MSSQL to the database
遥感图像/UDA:Curriculum-Style Local-to-Global Adaptation for Cross-Domain Remote Sensing Image Segmentat
How to create a CSR (certificate signing request) file?
East Tower attack and defense world - XSS bypasses the safety dog
Unity screenshot method
随机推荐
Sound net, debout dans le "sol" de l'IOT
El table lazy load refresh
C语言基础小操作
86. 分隔链表
Unity shortcut key
[chestnut sugar GIS] global mapper - how to assign the elevation value of the grid to the point
Sound network, standing in the "soil" of the Internet of things
Revit Secondary Development - - Project use Panel features not opened
旋转框目标检测mmrotate v0.3.1 学习配置
[typescript] defines the return value type of promise
86. separate linked list
Xctf--Web--Challenge--area Wp
如何制作CSR(Certificate Signing Request)文件?
Sword finger offer 22 The penultimate node in the linked list
On line assignment of financial cost management in the 22nd spring of Western Polytechnic University [Full Score answer]
C # uses monopinvokecallback to directly call back C # function
Solidy - fallback function - 2 trigger execution modes
Promise知识点拾遗
PKCs 12:personal information exchange syntax v1.1 translation part I
Unityshader learning notes - Basic Attributes